Core: Assign an explicit parent for main editor area

This avoids failing updates of the main window (e.g. windowTitle)
before the main editor area is displayed first time.

Change-Id: I5c559f9487872e47b1fd914f0aec16b0b2f1dec3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2016-06-30 07:51:52 +02:00
parent bb424cd8af
commit e69144d1da

View File

@@ -442,6 +442,8 @@ void EditorManagerPrivate::init()
// other setup
auto mainEditorArea = new EditorArea();
// assign parent to avoid failing updates (e.g. windowTitle) before it is displayed first time
mainEditorArea->setParent(ICore::mainWindow());
mainEditorArea->hide();
connect(mainEditorArea, &EditorArea::windowTitleNeedsUpdate,
this, &EditorManagerPrivate::updateWindowTitle);