forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user