forked from qt-creator/qt-creator
CppEditor: Partially move to new editor setup scheme
This needs more reorganization. For now, use a method to add cpp editor support directly without relying on a fully set up editor/widget/document combo. Change-Id: Id8631c75ccd209f418faef31f8b8a4c71e53d87d Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -96,9 +96,11 @@ CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) :
|
||||
|
||||
IEditor *CppEditorFactory::createEditor()
|
||||
{
|
||||
CppEditorWidget *editor = new CppEditorWidget(BaseTextDocumentPtr(new CPPEditorDocument));
|
||||
m_owner->initializeEditor(editor);
|
||||
return editor->editor();
|
||||
CPPEditor *editor = new CPPEditor;
|
||||
CppEditorWidget *widget = new CppEditorWidget(BaseTextDocumentPtr(new CPPEditorDocument), editor);
|
||||
m_owner->initializeEditor(widget);
|
||||
editor->configureCodeAssistant();
|
||||
return editor;
|
||||
}
|
||||
|
||||
///////////////////////////////// CppEditorPlugin //////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user