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
(cherry picked from commit db2fcdb416)
This commit is contained in:
Kai Koehne
2010-04-16 17:02:58 +02:00
committed by con
parent 7f1d5a7322
commit 8e3c9fa10d

View File

@@ -534,14 +534,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_statesEditorWidget = new StatesEditorWidget(this);
m_formEditorView = new FormEditorView(this); m_formEditorView = new FormEditorView(this);
m_itemLibrary = new ItemLibrary(this);
m_designToolBar = new QToolBar; m_designToolBar = new QToolBar;
m_fakeToolBar = Core::EditorManager::createToolBar(this); m_fakeToolBar = Core::EditorManager::createToolBar(this);