Editors: Sanity check that an id was set in the editor implementation.

Since the id is now a member, it must be explicitly set by
implementations.

Change-Id: Ibaa6ac604033ae0370e815b1e3d369dac99b36bd
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Eike Ziller
2014-02-26 14:47:33 +01:00
parent 924e54b448
commit 9d1a1d2cdf

View File

@@ -1417,6 +1417,7 @@ 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)
connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange()));
if (editor)