Wizards: Do not crash when dialogs are still open on quit

Change-Id: I49622484e316b902699e5b63ea3eea827d2f2680
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-06-04 16:36:45 +02:00
committed by Tobias Hunger
parent eaf718bdea
commit 4890307b0c
4 changed files with 13 additions and 10 deletions

View File

@@ -340,7 +340,7 @@ void ICore::showNewItemDialog(const QString &title,
{
QTC_ASSERT(!isNewItemDialogRunning(), return);
auto newDialog = new NewDialog(dialogParent());
connect(newDialog, &QObject::destroyed, &ICore::validateNewDialogIsRunning);
connect(newDialog, &QObject::destroyed, m_instance, &ICore::validateNewDialogIsRunning);
newDialog->setWizardFactories(factories, defaultLocation, extraVariables);
newDialog->setWindowTitle(title);
newDialog->showDialog();