TextEditor: Remove one stack of EditorWidget constructors

There are conceptually only two: one that operates a new document,
and one that shares one. Being explicit makes moving data over to
the Editor hierarchy easier. Convenience can be re-added there,
later.

Change-Id: I9b34ff26628c99ffff01201dcf99332d5e7253e9
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-07-31 14:44:42 +02:00
parent 73d41589ab
commit f5b0bd32b2
16 changed files with 38 additions and 48 deletions

View File

@@ -104,7 +104,7 @@ public:
// Open file
auto textDocument = new TextEditor::BaseTextDocument;
textDocument->setId(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID);
TextEditor::BaseTextEditorWidget editorWidget(textDocument);
TextEditor::BaseTextEditorWidget editorWidget(textDocument, 0);
editorWidget.setupAsPlainEditor();
QString error;
editorWidget.open(&error, document->fileName(), document->fileName());