forked from qt-creator/qt-creator
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:
@@ -1417,6 +1417,7 @@ 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)
|
||||||
connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange()));
|
connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange()));
|
||||||
if (editor)
|
if (editor)
|
||||||
|
|||||||
Reference in New Issue
Block a user