IWizardFactory: Remove class wizard kind

Map existing class wizards to file wizards. The separation has never
been clean anyway. Now "file" wizards create one or more files,
"project" wizards create a complete project (something that can be
opened as a project in Qt Creator).

Change-Id: I0562f26019b54a59d46814a13a0b2fa8995c3e0f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-05-19 11:44:04 +02:00
parent f895d97b03
commit 9c1f96d47a
13 changed files with 18 additions and 35 deletions

View File

@@ -387,8 +387,6 @@ void JsonWizardFactory::runWizard(const QString &path, QWidget *parent, const QS
QString kindStr = QLatin1String(Core::Constants::WIZARD_KIND_UNKNOWN);
if (kind() == IWizardFactory::FileWizard)
kindStr = QLatin1String(Core::Constants::WIZARD_KIND_FILE);
else if (kind() == IWizardFactory::ClassWizard)
kindStr = QLatin1String(Core::Constants::WIZARD_KIND_CLASS);
else if (kind() == IWizardFactory::ProjectWizard)
kindStr = QLatin1String(Core::Constants::WIZARD_KIND_PROJECT);
wizard.setValue(QStringLiteral("kind"), kindStr);
@@ -503,9 +501,7 @@ bool JsonWizardFactory::initialize(const QVariantMap &data, const QDir &baseDir,
return false;
}
IWizardFactory::WizardKind kind = IWizardFactory::ProjectWizard;
if (strVal == QLatin1String("class"))
kind = IWizardFactory::ClassWizard;
if (strVal == QLatin1String("file"))
if (strVal == QLatin1String("file") || strVal == QLatin1String("class"))
kind = IWizardFactory::FileWizard;
setWizardKind(kind);