forked from qt-creator/qt-creator
Fix crash on exit
Fix crash happening when closing creator after the toolchain settings were shown. Change-Id: I4ed3b4cb0c3a2c303ba0d346d90fd275022457da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -484,7 +484,7 @@ QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
|
|||||||
horizontalLayout->addLayout(verticalLayout);
|
horizontalLayout->addLayout(verticalLayout);
|
||||||
horizontalLayout->addLayout(buttonLayout);
|
horizontalLayout->addLayout(buttonLayout);
|
||||||
Q_ASSERT(!m_model);
|
Q_ASSERT(!m_model);
|
||||||
m_model = new ToolChainModel(verticalLayout);
|
m_model = new ToolChainModel(m_configWidget);
|
||||||
|
|
||||||
connect(m_model, SIGNAL(toolChainStateChanged()), this, SLOT(updateState()));
|
connect(m_model, SIGNAL(toolChainStateChanged()), this, SLOT(updateState()));
|
||||||
|
|
||||||
@@ -548,14 +548,16 @@ void ToolChainOptionsPage::apply()
|
|||||||
|
|
||||||
void ToolChainOptionsPage::finish()
|
void ToolChainOptionsPage::finish()
|
||||||
{
|
{
|
||||||
if (m_model) {
|
disconnect(ToolChainManager::instance(), SIGNAL(toolChainsChanged()),
|
||||||
m_model->deleteLater();
|
this, SLOT(toolChainSelectionChanged()));
|
||||||
m_model = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_configWidget = 0; // deleted by settingsdialog
|
// delete by settingsdialog;
|
||||||
m_selectionModel = 0; // child of m_configWidget
|
m_configWidget = 0;
|
||||||
// childs of m_configWidget
|
|
||||||
|
// children of m_configWidget
|
||||||
|
m_model = 0;
|
||||||
|
m_container = 0;
|
||||||
|
m_selectionModel = 0;
|
||||||
m_toolChainView = 0;
|
m_toolChainView = 0;
|
||||||
m_addButton = 0;
|
m_addButton = 0;
|
||||||
m_cloneButton = 0;
|
m_cloneButton = 0;
|
||||||
|
Reference in New Issue
Block a user