Register wizard windows so they appear in window list and get shortcuts

Change-Id: I69b3a49ba2e2162585502a523be835918b7b9533
Task-number: QTCREATORBUG-13766
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-01-05 11:12:39 +01:00
parent 98dbe9adca
commit 225e599c94
7 changed files with 29 additions and 3 deletions

View File

@@ -37,6 +37,7 @@
#include "../projectexplorerconstants.h"
#include <coreplugin/coreconstants.h>
#include <coreplugin/icontext.h>
#include <coreplugin/icore.h>
#include <coreplugin/messagemanager.h>
@@ -366,6 +367,7 @@ void JsonWizardFactory::runWizard(const QString &path, QWidget *parent, const QS
{
JsonWizard wizard(parent);
wizard.setWindowIcon(icon());
wizard.setWindowTitle(displayName());
wizard.setValue(QStringLiteral("WizardDir"), m_wizardDir);
Core::FeatureSet tmp = requiredFeatures();
@@ -434,10 +436,12 @@ void JsonWizardFactory::runWizard(const QString &path, QWidget *parent, const QS
wizard.addGenerator(gen);
}
if (!m_pages.isEmpty())
if (!m_pages.isEmpty()) {
Core::ICore::registerWindow(&wizard, Core::Context("Core.NewJSONWizard"));
wizard.exec();
else
} else {
wizard.accept();
}
}
QList<QVariant> JsonWizardFactory::objectOrList(const QVariant &data, QString *errorMessage)