diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 46323c474de..21edbe0f969 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1417,11 +1417,12 @@ IEditor *EditorManager::createEditor(const Id &editorId, const QString &fileName } 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())); - if (editor) emit m_instance->editorCreated(editor, fileName); + } + return editor; }