forked from qt-creator/qt-creator
TextEditor: Start moving data from *EditorWidget to *Editor
Goal is to consolidate "controller" related data in the *Editor hierarchy. This patch introduces temporary "cross-Private" accessors dd() to keep the patches small. First item moved is the AutoCompleter, a glimps at long term benefits is the simplification in the JavaEditorWidget which is now essentially a BaseTextEditorWidget, only containing the still-wrong createEditor(). But that can only be move if the *Editors are self-contained, i.e. keep data themselves, not indirectly through the *EditorWidgets. Change-Id: Ia0ab90f0322bb17ac20458e6581069eed30acbaf Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -130,7 +130,6 @@ public:
|
||||
|
||||
static BaseTextEditor *currentTextEditor();
|
||||
|
||||
friend class BaseTextEditorWidget;
|
||||
BaseTextEditorWidget *editorWidget() const;
|
||||
BaseTextDocument *baseTextDocument();
|
||||
|
||||
@@ -195,6 +194,9 @@ public:
|
||||
|
||||
QObject *fileEncodingLabel() const; // FIXME: Remove
|
||||
|
||||
void setAutoCompleter(AutoCompleter *autoCompleter);
|
||||
AutoCompleter *autoCompleter() const;
|
||||
|
||||
signals:
|
||||
void markRequested(TextEditor::BaseTextEditor *editor, int line, TextEditor::BaseTextEditor::MarkRequestKind kind);
|
||||
void markContextMenuRequested(TextEditor::BaseTextEditor *editor, int line, QMenu *menu);
|
||||
@@ -210,6 +212,8 @@ private slots:
|
||||
void setFileEncodingLabelText(const QString &text);
|
||||
|
||||
private:
|
||||
friend class Internal::BaseTextEditorWidgetPrivate;
|
||||
friend class BaseTextEditorWidget;
|
||||
Internal::BaseTextEditorPrivate *d;
|
||||
};
|
||||
|
||||
@@ -315,9 +319,6 @@ public:
|
||||
|
||||
QRegion translatedLineRegion(int lineStart, int lineEnd) const;
|
||||
|
||||
void setAutoCompleter(AutoCompleter *autoCompleter);
|
||||
AutoCompleter *autoCompleter() const;
|
||||
|
||||
QPoint toolTipPosition(const QTextCursor &c) const;
|
||||
|
||||
void invokeAssist(AssistKind assistKind, IAssistProvider *provider = 0);
|
||||
@@ -619,6 +620,7 @@ private slots:
|
||||
|
||||
private:
|
||||
Internal::BaseTextEditorWidgetPrivate *d;
|
||||
Internal::BaseTextEditorPrivate *dd() const;
|
||||
friend class Internal::BaseTextEditorWidgetPrivate;
|
||||
friend class Internal::TextEditorOverlay;
|
||||
friend class RefactorOverlay;
|
||||
|
||||
Reference in New Issue
Block a user