QmlDesigner: Fix crash on exit

QtCreator crashed on exit when the library/navigator/sidebar wasn't
visible in the Design mode. This is caused by a double deletion: The
widgets have the DesignModeWidget as the default parent + the side bar
items try to delete them on exit.

Fixed by removing default parent.

Task-number: QTCREATORBUG-1197
Reviewed-by: Christiaan Janssen
This commit is contained in:
Kai Koehne
2010-04-16 17:02:58 +02:00
parent a8db81fb08
commit db2fcdb416

View File

@@ -535,14 +535,15 @@ void DesignModeWidget::setup()
}
}
m_navigator = new NavigatorView(this);
// Sidebar takes ownership
m_navigator = new NavigatorView;
m_allPropertiesBox = new AllPropertiesBox;
m_itemLibrary = new ItemLibrary;
m_allPropertiesBox = new AllPropertiesBox(this);
m_statesEditorWidget = new StatesEditorWidget(this);
m_formEditorView = new FormEditorView(this);
m_itemLibrary = new ItemLibrary(this);
//m_designToolBar = new QToolBar;
m_fakeToolBar = Core::EditorManager::createToolBar(this);