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:
@@ -117,6 +117,7 @@ CPPEditor::CPPEditor(CppEditorWidget *editor)
|
||||
setCompletionAssistProvider([this] () -> TextEditor::CompletionAssistProvider * {
|
||||
return CppModelManagerInterface::instance()->cppEditorSupport(this)->completionAssistProvider();
|
||||
});
|
||||
setAutoCompleter(new CppAutoCompleter);
|
||||
}
|
||||
|
||||
Q_GLOBAL_STATIC(CppTools::SymbolFinder, symbolFinder)
|
||||
@@ -197,7 +198,6 @@ void CppEditorWidget::ctor()
|
||||
setParenthesesMatchingEnabled(true);
|
||||
setMarksVisible(true);
|
||||
setCodeFoldingSupported(true);
|
||||
setAutoCompleter(new CppAutoCompleter);
|
||||
|
||||
if (d->m_modelManager) {
|
||||
CppEditorSupport *editorSupport = d->m_modelManager->cppEditorSupport(editor());
|
||||
|
||||
Reference in New Issue
Block a user