Commit 5b5bea0c authored by Tobias Hunger's avatar Tobias Hunger

BaseFileWizardFactory: rename createWizardDialog method to create

Unify name of parameters object that gets passed into the method while
at it anyway.

Change-Id: I9cfdfe3b7dcdbd5e083b3b91922053be3a63b081
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent a34b0b90
...@@ -164,7 +164,7 @@ void WizardEventLoop::rejected() ...@@ -164,7 +164,7 @@ void WizardEventLoop::rejected()
The following abstract functions must be implemented: The following abstract functions must be implemented:
\list \list
\li createWizardDialog(): Called to create the QWizard dialog to be shown. \li create(): Called to create the QWizard dialog to be shown.
\li generateFiles(): Generates file content. \li generateFiles(): Generates file content.
\endlist \endlist
...@@ -214,12 +214,12 @@ void BaseFileWizardFactory::runWizard(const QString &path, QWidget *parent, cons ...@@ -214,12 +214,12 @@ void BaseFileWizardFactory::runWizard(const QString &path, QWidget *parent, cons
if (flags().testFlag(ForceCapitalLetterForFileName)) if (flags().testFlag(ForceCapitalLetterForFileName))
dialogParameterFlags |= WizardDialogParameters::ForceCapitalLetterForFileName; dialogParameterFlags |= WizardDialogParameters::ForceCapitalLetterForFileName;
const QScopedPointer<QWizard> wizard(createWizardDialog(parent, WizardDialogParameters(path, const QScopedPointer<QWizard> wizard(create(parent, WizardDialogParameters(path,
allExtensionPages, allExtensionPages,
platform, platform,
requiredFeatures(), requiredFeatures(),
dialogParameterFlags, dialogParameterFlags,
extraValues))); extraValues)));
QTC_ASSERT(!wizard.isNull(), return); QTC_ASSERT(!wizard.isNull(), return);
GeneratedFiles files; GeneratedFiles files;
...@@ -300,11 +300,10 @@ void BaseFileWizardFactory::runWizard(const QString &path, QWidget *parent, cons ...@@ -300,11 +300,10 @@ void BaseFileWizardFactory::runWizard(const QString &path, QWidget *parent, cons
} }
/*! /*!
\fn virtual QWizard *Core::BaseFileWizard::createWizardDialog(QWidget *parent, \fn virtual QWizard *Core::BaseFileWizard::create(QWidget *parent,
const WizardDialogParameters &wizardDialogParameters) const const WizardDialogParameters &parameters) const
Creates the wizard dialog on the \a parent with the Creates the wizard on the \a parent with the \a parameters.
\a wizardDialogParameters.
*/ */
/*! /*!
...@@ -525,15 +524,14 @@ QString BaseFileWizardFactory::preferredSuffix(const QString &mimeType) ...@@ -525,15 +524,14 @@ QString BaseFileWizardFactory::preferredSuffix(const QString &mimeType)
Creates a Utils::FileWizardDialog. Creates a Utils::FileWizardDialog.
*/ */
QWizard *StandardFileWizardFactory::createWizardDialog(QWidget *parent, QWizard *StandardFileWizardFactory::create(QWidget *parent, const WizardDialogParameters &parameters) const
const WizardDialogParameters &wizardDialogParameters) const
{ {
Utils::FileWizardDialog *standardWizardDialog = new Utils::FileWizardDialog(parent); Utils::FileWizardDialog *standardWizardDialog = new Utils::FileWizardDialog(parent);
if (wizardDialogParameters.flags().testFlag(WizardDialogParameters::ForceCapitalLetterForFileName)) if (parameters.flags().testFlag(WizardDialogParameters::ForceCapitalLetterForFileName))
standardWizardDialog->setForceFirstCapitalLetterForFileName(true); standardWizardDialog->setForceFirstCapitalLetterForFileName(true);
standardWizardDialog->setWindowTitle(tr("New %1").arg(displayName())); standardWizardDialog->setWindowTitle(tr("New %1").arg(displayName()));
standardWizardDialog->setPath(wizardDialogParameters.defaultPath()); standardWizardDialog->setPath(parameters.defaultPath());
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, parameters.extensionPages())
BaseFileWizardFactory::applyExtensionPageShortTitle(standardWizardDialog, standardWizardDialog->addPage(p)); BaseFileWizardFactory::applyExtensionPageShortTitle(standardWizardDialog, standardWizardDialog->addPage(p));
return standardWizardDialog; return standardWizardDialog;
} }
......
...@@ -120,8 +120,7 @@ protected: ...@@ -120,8 +120,7 @@ protected:
virtual ExtensionList extensions() const; virtual ExtensionList extensions() const;
virtual QWizard *createWizardDialog(QWidget *parent, virtual QWizard *create(QWidget *parent, const WizardDialogParameters &parameters) const = 0;
const WizardDialogParameters &wizardDialogParameters) const = 0;
virtual GeneratedFiles generateFiles(const QWizard *w, virtual GeneratedFiles generateFiles(const QWizard *w,
QString *errorMessage) const = 0; QString *errorMessage) const = 0;
...@@ -143,7 +142,7 @@ class CORE_EXPORT StandardFileWizardFactory : public BaseFileWizardFactory ...@@ -143,7 +142,7 @@ class CORE_EXPORT StandardFileWizardFactory : public BaseFileWizardFactory
Q_OBJECT Q_OBJECT
protected: protected:
QWizard *createWizardDialog(QWidget *parent, const WizardDialogParameters &wizardDialogParameters) const; QWizard *create(QWidget *parent, const WizardDialogParameters &parameters) const;
GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
virtual GeneratedFiles generateFilesFromPath(const QString &path, const QString &name, virtual GeneratedFiles generateFilesFromPath(const QString &path, const QString &name,
QString *errorMessage) const = 0; QString *errorMessage) const = 0;
......
...@@ -153,13 +153,12 @@ QString CppClassWizard::headerSuffix() const ...@@ -153,13 +153,12 @@ QString CppClassWizard::headerSuffix() const
return preferredSuffix(QLatin1String(Constants::CPP_HEADER_MIMETYPE)); return preferredSuffix(QLatin1String(Constants::CPP_HEADER_MIMETYPE));
} }
QWizard *CppClassWizard::createWizardDialog(QWidget *parent, QWizard *CppClassWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
CppClassWizardDialog *wizard = new CppClassWizardDialog(parent); CppClassWizardDialog *wizard = new CppClassWizardDialog(parent);
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, parameters.extensionPages())
BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p)); BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p));
wizard->setPath(wizardDialogParameters.defaultPath()); wizard->setPath(parameters.defaultPath());
return wizard; return wizard;
} }
......
...@@ -95,9 +95,7 @@ public: ...@@ -95,9 +95,7 @@ public:
CppClassWizard(); CppClassWizard();
private: private:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, Core::GeneratedFiles generateFiles(const QWizard *w,
QString *errorMessage) const; QString *errorMessage) const;
......
...@@ -60,12 +60,11 @@ QString FormClassWizard::formSuffix() const ...@@ -60,12 +60,11 @@ QString FormClassWizard::formSuffix() const
return preferredSuffix(QLatin1String(Constants::FORM_MIMETYPE)); return preferredSuffix(QLatin1String(Constants::FORM_MIMETYPE));
} }
QWizard *FormClassWizard::createWizardDialog(QWidget *parent, QWizard *FormClassWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
FormClassWizardDialog *wizardDialog = new FormClassWizardDialog(wizardDialogParameters.extensionPages(), FormClassWizardDialog *wizardDialog = new FormClassWizardDialog(parameters.extensionPages(),
parent); parent);
wizardDialog->setPath(wizardDialogParameters.defaultPath()); wizardDialog->setPath(parameters.defaultPath());
return wizardDialog; return wizardDialog;
} }
......
...@@ -49,8 +49,7 @@ public: ...@@ -49,8 +49,7 @@ public:
QString formSuffix() const; QString formSuffix() const;
private: private:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
}; };
......
...@@ -42,12 +42,11 @@ FormWizard::FormWizard() ...@@ -42,12 +42,11 @@ FormWizard::FormWizard()
addRequiredFeature(Core::Id(QtSupport::Constants::FEATURE_QWIDGETS)); addRequiredFeature(Core::Id(QtSupport::Constants::FEATURE_QWIDGETS));
} }
QWizard *FormWizard::createWizardDialog(QWidget *parent, QWizard *FormWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
FormFileWizardDialog *wizardDialog = new FormFileWizardDialog(wizardDialogParameters.extensionPages(), FormFileWizardDialog *wizardDialog = new FormFileWizardDialog(parameters.extensionPages(),
parent); parent);
wizardDialog->setPath(wizardDialogParameters.defaultPath()); wizardDialog->setPath(parameters.defaultPath());
return wizardDialog; return wizardDialog;
} }
......
...@@ -43,8 +43,7 @@ public: ...@@ -43,8 +43,7 @@ public:
FormWizard(); FormWizard();
private: private:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
}; };
......
...@@ -132,14 +132,13 @@ GenericProjectWizard::GenericProjectWizard() ...@@ -132,14 +132,13 @@ GenericProjectWizard::GenericProjectWizard()
setFlags(Core::IWizardFactory::PlatformIndependent); setFlags(Core::IWizardFactory::PlatformIndependent);
} }
QWizard *GenericProjectWizard::createWizardDialog(QWidget *parent, QWizard *GenericProjectWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
GenericProjectWizardDialog *wizard = new GenericProjectWizardDialog(parent); GenericProjectWizardDialog *wizard = new GenericProjectWizardDialog(parent);
wizard->setPath(wizardDialogParameters.defaultPath()); wizard->setPath(parameters.defaultPath());
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, parameters.extensionPages())
BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p)); BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p));
return wizard; return wizard;
......
...@@ -66,8 +66,7 @@ public: ...@@ -66,8 +66,7 @@ public:
GenericProjectWizard(); GenericProjectWizard();
protected: protected:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage); bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
}; };
......
...@@ -127,13 +127,12 @@ QString GLSLFileWizard::fileContents(const QString &, ShaderType shaderType) con ...@@ -127,13 +127,12 @@ QString GLSLFileWizard::fileContents(const QString &, ShaderType shaderType) con
return contents; return contents;
} }
QWizard *GLSLFileWizard::createWizardDialog(QWidget *parent, QWizard *GLSLFileWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
GLSLFileWizardDialog *wizardDialog = new GLSLFileWizardDialog(parent); GLSLFileWizardDialog *wizardDialog = new GLSLFileWizardDialog(parent);
wizardDialog->setWindowTitle(tr("New %1").arg(displayName())); wizardDialog->setWindowTitle(tr("New %1").arg(displayName()));
wizardDialog->setPath(wizardDialogParameters.defaultPath()); wizardDialog->setPath(parameters.defaultPath());
foreach (QWizardPage *p, wizardDialogParameters.extensionPages()) foreach (QWizardPage *p, parameters.extensionPages())
BaseFileWizardFactory::applyExtensionPageShortTitle(wizardDialog, wizardDialog->addPage(p)); BaseFileWizardFactory::applyExtensionPageShortTitle(wizardDialog, wizardDialog->addPage(p));
return wizardDialog; return wizardDialog;
} }
......
...@@ -52,8 +52,7 @@ public: ...@@ -52,8 +52,7 @@ public:
private: private:
QString fileContents(const QString &baseName, ShaderType shaderType) const; QString fileContents(const QString &baseName, ShaderType shaderType) const;
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, Core::GeneratedFiles generateFiles(const QWizard *w,
QString *errorMessage) const; QString *errorMessage) const;
......
...@@ -152,12 +152,11 @@ void CustomWizard::initWizardDialog(Utils::Wizard *wizard, const QString &defaul ...@@ -152,12 +152,11 @@ void CustomWizard::initWizardDialog(Utils::Wizard *wizard, const QString &defaul
qDebug() << "initWizardDialog" << wizard << wizard->pageIds(); qDebug() << "initWizardDialog" << wizard << wizard->pageIds();
} }
QWizard *CustomWizard::createWizardDialog(QWidget *parent, QWizard *CustomWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
QTC_ASSERT(!d->m_parameters.isNull(), return 0); QTC_ASSERT(!d->m_parameters.isNull(), return 0);
Utils::Wizard *wizard = new Utils::Wizard(parent); Utils::Wizard *wizard = new Utils::Wizard(parent);
initWizardDialog(wizard, wizardDialogParameters.defaultPath(), wizardDialogParameters.extensionPages()); initWizardDialog(wizard, parameters.defaultPath(), parameters.extensionPages());
return wizard; return wizard;
} }
...@@ -503,14 +502,13 @@ CustomProjectWizard::CustomProjectWizard() ...@@ -503,14 +502,13 @@ CustomProjectWizard::CustomProjectWizard()
initProjectWizardDialog() needs to be called. initProjectWizardDialog() needs to be called.
*/ */
QWizard *CustomProjectWizard::createWizardDialog(QWidget *parent, QWizard *CustomProjectWizard::create(QWidget *parent,
const Core::WizardDialogParameters &wizardDialogParameters) const const Core::WizardDialogParameters &parameters) const
{ {
QTC_ASSERT(!parameters().isNull(), return 0); BaseProjectWizardDialog *projectDialog = new BaseProjectWizardDialog(parent, parameters);
BaseProjectWizardDialog *projectDialog = new BaseProjectWizardDialog(parent, wizardDialogParameters);
initProjectWizardDialog(projectDialog, initProjectWizardDialog(projectDialog,
wizardDialogParameters.defaultPath(), parameters.defaultPath(),
wizardDialogParameters.extensionPages()); parameters.extensionPages());
return projectDialog; return projectDialog;
} }
......
...@@ -96,8 +96,7 @@ public: ...@@ -96,8 +96,7 @@ public:
// Can be reimplemented to create custom wizards. initWizardDialog() needs to be // Can be reimplemented to create custom wizards. initWizardDialog() needs to be
// called. // called.
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
...@@ -144,8 +143,7 @@ public: ...@@ -144,8 +143,7 @@ public:
static bool postGenerateOpen(const Core::GeneratedFiles &l, QString *errorMessage = 0); static bool postGenerateOpen(const Core::GeneratedFiles &l, QString *errorMessage = 0);
protected: protected:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
......
...@@ -55,15 +55,13 @@ ClassWizard::ClassWizard() ...@@ -55,15 +55,13 @@ ClassWizard::ClassWizard()
setDescription(ClassWizard::tr(Constants::EN_PY_CLASS_DESCRIPTION)); setDescription(ClassWizard::tr(Constants::EN_PY_CLASS_DESCRIPTION));
} }
QWizard *ClassWizard::createWizardDialog( QWizard *ClassWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
QWidget *parent,
const Core::WizardDialogParameters &params) const
{ {
ClassWizardDialog *wizard = new ClassWizardDialog(parent); ClassWizardDialog *wizard = new ClassWizardDialog(parent);
foreach (QWizardPage *p, params.extensionPages()) foreach (QWizardPage *p, parameters.extensionPages())
BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p)); BaseFileWizardFactory::applyExtensionPageShortTitle(wizard, wizard->addPage(p));
wizard->setPath(params.defaultPath()); wizard->setPath(parameters.defaultPath());
wizard->setExtraValues(params.extraValues()); wizard->setExtraValues(parameters.extraValues());
return wizard; return wizard;
} }
......
...@@ -49,8 +49,7 @@ public: ...@@ -49,8 +49,7 @@ public:
ClassWizard(); ClassWizard();
private: private:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &params) const;
Core::GeneratedFiles generateFiles(const QWizard *w, Core::GeneratedFiles generateFiles(const QWizard *w,
QString *errorMessage) const; QString *errorMessage) const;
......
...@@ -61,13 +61,12 @@ FileWizard::FileWizard() ...@@ -61,13 +61,12 @@ FileWizard::FileWizard()
* @param params * @param params
* @return * @return
*/ */
QWizard *FileWizard::createWizardDialog(QWidget *parent, QWizard *FileWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &params) const
{ {
Utils::FileWizardDialog *pDialog = new Utils::FileWizardDialog(parent); Utils::FileWizardDialog *pDialog = new Utils::FileWizardDialog(parent);
pDialog->setWindowTitle(tr("New %1").arg(displayName())); pDialog->setWindowTitle(tr("New %1").arg(displayName()));
pDialog->setPath(params.defaultPath()); pDialog->setPath(parameters.defaultPath());
foreach (QWizardPage *p, params.extensionPages()) foreach (QWizardPage *p, parameters.extensionPages())
applyExtensionPageShortTitle(pDialog, pDialog->addPage(p)); applyExtensionPageShortTitle(pDialog, pDialog->addPage(p));
return pDialog; return pDialog;
......
...@@ -42,8 +42,7 @@ public: ...@@ -42,8 +42,7 @@ public:
FileWizard(); FileWizard();
protected: protected:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &params) const;
Core::GeneratedFiles generateFiles(const QWizard *dialog, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *dialog, QString *errorMessage) const;
}; };
......
...@@ -54,14 +54,13 @@ CustomWidgetWizard::CustomWidgetWizard() ...@@ -54,14 +54,13 @@ CustomWidgetWizard::CustomWidgetWizard()
setRequiredFeatures(Core::Feature(QtSupport::Constants::FEATURE_QWIDGETS)); setRequiredFeatures(Core::Feature(QtSupport::Constants::FEATURE_QWIDGETS));
} }
QWizard *CustomWidgetWizard::createWizardDialog(QWidget *parent, QWizard *CustomWidgetWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
CustomWidgetWizardDialog *rc = new CustomWidgetWizardDialog(displayName(), CustomWidgetWizardDialog *rc = new CustomWidgetWizardDialog(displayName(),
icon(), icon(),
parent, parent,
wizardDialogParameters); parameters);
rc->setProjectName(CustomWidgetWizardDialog::uniqueProjectName(wizardDialogParameters.defaultPath())); rc->setProjectName(CustomWidgetWizardDialog::uniqueProjectName(parameters.defaultPath()));
rc->setFileNamingParameters(FileNamingParameters(headerSuffix(), sourceSuffix(), QtWizard::lowerCaseFiles())); rc->setFileNamingParameters(FileNamingParameters(headerSuffix(), sourceSuffix(), QtWizard::lowerCaseFiles()));
return rc; return rc;
} }
......
...@@ -43,8 +43,7 @@ public: ...@@ -43,8 +43,7 @@ public:
CustomWidgetWizard(); CustomWidgetWizard();
protected: protected:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const;
}; };
......
...@@ -98,15 +98,14 @@ int AbstractMobileAppWizardDialog::addPageWithTitle(QWizardPage *page, const QSt ...@@ -98,15 +98,14 @@ int AbstractMobileAppWizardDialog::addPageWithTitle(QWizardPage *page, const QSt
return pageId; return pageId;
} }
QWizard *AbstractMobileAppWizard::createWizardDialog(QWidget *parent, QWizard *AbstractMobileAppWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
AbstractMobileAppWizardDialog * const wdlg AbstractMobileAppWizardDialog * const wdlg
= createWizardDialogInternal(parent, wizardDialogParameters); = createInternal(parent, parameters);
wdlg->setProjectName(ProjectExplorer::BaseProjectWizardDialog::uniqueProjectName(wizardDialogParameters.defaultPath())); wdlg->setProjectName(ProjectExplorer::BaseProjectWizardDialog::uniqueProjectName(parameters.defaultPath()));
connect(wdlg, SIGNAL(projectParametersChanged(QString,QString)), connect(wdlg, SIGNAL(projectParametersChanged(QString,QString)),
SLOT(useProjectPath(QString,QString))); SLOT(useProjectPath(QString,QString)));
wdlg->addExtensionPages(wizardDialogParameters.extensionPages()); wdlg->addExtensionPages(parameters.extensionPages());
return wdlg; return wdlg;
} }
......
...@@ -77,15 +77,14 @@ protected: ...@@ -77,15 +77,14 @@ protected:
virtual QString fileToOpenPostGeneration() const = 0; virtual QString fileToOpenPostGeneration() const = 0;
private: private:
QWizard *createWizardDialog(QWidget *parent, QWizard *create(QWidget *parent, const Core::WizardDialogParameters &parameters) const;
const Core::WizardDialogParameters &wizardDialogParameters) const;
Core::GeneratedFiles generateFiles(const QWizard *wizard, QString *errorMessage) const; Core::GeneratedFiles generateFiles(const QWizard *wizard, QString *errorMessage) const;
bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage); bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
virtual AbstractMobileApp *app() const = 0; virtual AbstractMobileApp *app() const = 0;
virtual AbstractMobileAppWizardDialog *wizardDialog() const = 0; virtual AbstractMobileAppWizardDialog *wizardDialog() const = 0;
virtual AbstractMobileAppWizardDialog *createWizardDialogInternal(QWidget *parent, virtual AbstractMobileAppWizardDialog *createInternal(QWidget *parent,
const Core::WizardDialogParameters &wizardDialogParameters) const = 0; const Core::WizardDialogParameters &parameters) const = 0;
virtual void projectPathChanged(const QString &path) const = 0; virtual void projectPathChanged(const QString &path) const = 0;
virtual void prepareGenerateFiles(const QWizard *wizard, QString *errorMessage) const = 0; virtual void prepareGenerateFiles(const QWizard *wizard, QString *errorMessage) const = 0;
}; };
......
...@@ -65,12 +65,11 @@ ConsoleAppWizard::ConsoleAppWizard() ...@@ -65,12 +65,11 @@ ConsoleAppWizard::ConsoleAppWizard()
setRequiredFeatures(Core::Feature(QtSupport::Constants::FEATURE_QT_CONSOLE)); setRequiredFeatures(Core::Feature(QtSupport::Constants::FEATURE_QT_CONSOLE));
} }
QWizard *ConsoleAppWizard::createWizardDialog(QWidget *parent, QWizard *ConsoleAppWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
const Core::WizardDialogParameters &wizardDialogParameters) const
{ {
ConsoleAppWizardDialog *dialog = new ConsoleAppWizardDialog(displayName(), icon(), ConsoleAppWizardDialog *dialog = new ConsoleAppWizardDialog(displayName(), icon(),
showModulesPageForApplications(), parent, wizardDialogParameters);