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:
hjk
2014-08-21 18:08:58 +02:00
parent bb9edec99a
commit 307129bf8f
3 changed files with 17 additions and 15 deletions

View File

@@ -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 //////////////////////////////////