ICore: Consistently use NewItemDialog to refer to File>New dialog

Change-Id: I28fba1e7cca3f9885d14c6e58d693046a4c0ea33
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-09-23 14:06:29 +02:00
parent c14e73cdd6
commit 819438a37b
3 changed files with 7 additions and 7 deletions

View File

@@ -343,12 +343,12 @@ void ICore::showNewItemDialog(const QString &title,
{ {
QTC_ASSERT(!isNewItemDialogRunning(), return); QTC_ASSERT(!isNewItemDialogRunning(), return);
auto newDialog = new NewDialog(dialogParent()); auto newDialog = new NewDialog(dialogParent());
connect(newDialog, &QObject::destroyed, m_instance, &ICore::validateNewDialogIsRunning); connect(newDialog, &QObject::destroyed, m_instance, &ICore::validateNewItemDialogIsRunning);
newDialog->setWizardFactories(factories, defaultLocation, extraVariables); newDialog->setWizardFactories(factories, defaultLocation, extraVariables);
newDialog->setWindowTitle(title); newDialog->setWindowTitle(title);
newDialog->showDialog(); newDialog->showDialog();
validateNewDialogIsRunning(); validateNewItemDialogIsRunning();
} }
bool ICore::showOptionsDialog(const Id page, QWidget *parent) bool ICore::showOptionsDialog(const Id page, QWidget *parent)
@@ -571,7 +571,7 @@ void ICore::saveSettings()
ICore::settings(QSettings::UserScope)->sync(); ICore::settings(QSettings::UserScope)->sync();
} }
void ICore::validateNewDialogIsRunning() void ICore::validateNewItemDialogIsRunning()
{ {
static bool wasRunning = false; static bool wasRunning = false;
if (wasRunning == isNewItemDialogRunning()) if (wasRunning == isNewItemDialogRunning())

View File

@@ -140,7 +140,7 @@ signals:
void themeChanged(); void themeChanged();
private: private:
static void validateNewDialogIsRunning(); static void validateNewItemDialogIsRunning();
static void newItemDialogOpened(); static void newItemDialogOpened();
static void newItemDialogClosed(); static void newItemDialogClosed();
}; };

View File

@@ -250,7 +250,7 @@ QString IWizardFactory::runPath(const QString &defaultPath)
Utils::Wizard *IWizardFactory::runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &variables) Utils::Wizard *IWizardFactory::runWizard(const QString &path, QWidget *parent, const QString &platform, const QVariantMap &variables)
{ {
s_isWizardRunning = true; s_isWizardRunning = true;
ICore::validateNewDialogIsRunning(); ICore::validateNewItemDialogIsRunning();
Utils::Wizard *wizard = runWizardImpl(path, parent, platform, variables); Utils::Wizard *wizard = runWizardImpl(path, parent, platform, variables);
@@ -262,7 +262,7 @@ Utils::Wizard *IWizardFactory::runWizard(const QString &path, QWidget *parent, c
connect(wizard, &Utils::Wizard::finished, [wizard]() { connect(wizard, &Utils::Wizard::finished, [wizard]() {
s_isWizardRunning = false; s_isWizardRunning = false;
s_inspectWizardAction->setEnabled(false); s_inspectWizardAction->setEnabled(false);
ICore::validateNewDialogIsRunning(); ICore::validateNewItemDialogIsRunning();
wizard->deleteLater(); wizard->deleteLater();
}); });
s_inspectWizardAction->setEnabled(true); s_inspectWizardAction->setEnabled(true);
@@ -270,7 +270,7 @@ Utils::Wizard *IWizardFactory::runWizard(const QString &path, QWidget *parent, c
Core::ICore::registerWindow(wizard, Core::Context("Core.NewWizard")); Core::ICore::registerWindow(wizard, Core::Context("Core.NewWizard"));
} else { } else {
s_isWizardRunning = false; s_isWizardRunning = false;
ICore::validateNewDialogIsRunning(); ICore::validateNewItemDialogIsRunning();
} }
return wizard; return wizard;
} }