Editors: Minor branch consolidation

Change-Id: Ida5ed6c5a7fb623c64573eb538771c4376c3c578
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2014-02-26 16:01:58 +01:00
parent c5cc4b1f13
commit b49ef52b86

View File

@@ -1417,11 +1417,12 @@ IEditor *EditorManager::createEditor(const Id &editorId, const QString &fileName
} }
IEditor *editor = factories.front()->createEditor(); IEditor *editor = factories.front()->createEditor();
QTC_CHECK(!editor || editor->id().isValid()); // sanity check that the editor has an id set if (editor) {
if (editor) QTC_CHECK(editor->id().isValid()); // sanity check that the editor has an id set
connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange())); connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange()));
if (editor)
emit m_instance->editorCreated(editor, fileName); emit m_instance->editorCreated(editor, fileName);
}
return editor; return editor;
} }