Commit 1c51de11 authored by Tobias Hunger's avatar Tobias Hunger Committed by Eike Ziller

Wizards: Simplify code a bit

Change-Id: Iedcb36af5a64c2ae322bb2eb7f7fa73df9426114
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 828b0de5
......@@ -88,9 +88,7 @@ GuiAppWizard::GuiAppWizard()
Core::BaseFileWizard *GuiAppWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
{
GuiAppWizardDialog *dialog = new GuiAppWizardDialog(displayName(), icon(),
showModulesPageForApplications(),
parent, parameters);
GuiAppWizardDialog *dialog = new GuiAppWizardDialog(displayName(), icon(), parent, parameters);
dialog->setProjectName(GuiAppWizardDialog::uniqueProjectName(parameters.defaultPath()));
// Order! suffixes first to generate files correctly
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
......
......@@ -47,10 +47,9 @@ GuiAppParameters::GuiAppParameters()
GuiAppWizardDialog::GuiAppWizardDialog(const QString &templateName,
const QIcon &icon,
bool showModulesPage,
QWidget *parent,
const Core::WizardDialogParameters &parameters) :
BaseQmakeProjectWizardDialog(showModulesPage, parent, parameters),
BaseQmakeProjectWizardDialog(false, parent, parameters),
m_filesPage(new FilesPage)
{
setWindowIcon(icon);
......
......@@ -61,7 +61,6 @@ class GuiAppWizardDialog : public BaseQmakeProjectWizardDialog
public:
explicit GuiAppWizardDialog(const QString &templateName,
const QIcon &icon,
bool showModulesPage,
QWidget *parent,
const Core::WizardDialogParameters &parameters);
......
......@@ -61,9 +61,7 @@ LibraryWizard::LibraryWizard()
Core::BaseFileWizard *LibraryWizard::create(QWidget *parent, const Core::WizardDialogParameters &parameters) const
{
LibraryWizardDialog *dialog = new LibraryWizardDialog(displayName(), icon(),
showModulesPageForLibraries(), parent,
parameters);
LibraryWizardDialog *dialog = new LibraryWizardDialog(displayName(), icon(), parent, parameters);
dialog->setLowerCaseFiles(QtWizard::lowerCaseFiles());
dialog->setProjectName(LibraryWizardDialog::uniqueProjectName(parameters.defaultPath()));
dialog->setSuffixes(headerSuffix(), sourceSuffix(), formSuffix());
......
......@@ -131,10 +131,9 @@ QtProjectParameters::Type LibraryIntroPage::type() const
// ------------------- LibraryWizardDialog
LibraryWizardDialog::LibraryWizardDialog(const QString &templateName,
const QIcon &icon,
bool showModulesPage,
QWidget *parent,
const Core::WizardDialogParameters &parameters) :
BaseQmakeProjectWizardDialog(showModulesPage, new LibraryIntroPage, -1, parent, parameters),
BaseQmakeProjectWizardDialog(true, new LibraryIntroPage, -1, parent, parameters),
m_filesPage(new FilesPage),
m_pluginBaseClassesInitialized(false),
m_filesPageId(-1), m_modulesPageId(-1), m_targetPageId(-1)
......
......@@ -48,7 +48,6 @@ class LibraryWizardDialog : public BaseQmakeProjectWizardDialog
public:
LibraryWizardDialog(const QString &templateName,
const QIcon &icon,
bool showModulesPage,
QWidget *parent,
const Core::WizardDialogParameters &parameters);
......
......@@ -121,16 +121,6 @@ bool QtWizard::lowerCaseFiles()
return Core::ICore::settings()->value(lowerCaseSettingsKey, QVariant(lowerCaseDefault)).toBool();
}
bool QtWizard::showModulesPageForApplications()
{
return false;
}
bool QtWizard::showModulesPageForLibraries()
{
return true;
}
// ------------ CustomQmakeProjectWizard
CustomQmakeProjectWizard::CustomQmakeProjectWizard()
{
......
......@@ -76,10 +76,6 @@ public:
static bool qt4ProjectPostGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
protected:
static bool showModulesPageForApplications();
static bool showModulesPageForLibraries();
private:
bool postGenerateFiles(const QWizard *w, const Core::GeneratedFiles &l, QString *errorMessage);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment