forked from qt-creator/qt-creator
Wizards: avoiding code duplication
I moved setPath(wizardDialogParameters.defaultPath()) into the constructor of BaseProjectWizardDialog. I created addExtensionPages() instead of having of having the foreach everywhere. Moving the call into the constructor of BaseProjectWizardDialog is not trivial since a lot of derived classes rely on execution order and the order is often different. Entangling this is not trivial and easily might break functionality. Change-Id: I48dddaf72caea84da783dc9e2f42f2c7eff1c0ce Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -320,6 +320,12 @@ bool BaseQt4ProjectWizardDialog::isTargetSelected(const QString &targetid) const
|
||||
return m_targetSetupPage->isTargetSelected(targetid);
|
||||
}
|
||||
|
||||
void BaseQt4ProjectWizardDialog::addExtensionPages(const QList<QWizardPage *> &wizardPageList)
|
||||
{
|
||||
foreach (QWizardPage *p,wizardPageList)
|
||||
Core::BaseFileWizard::applyExtensionPageShortTitle(this, addPage(p));
|
||||
}
|
||||
|
||||
void BaseQt4ProjectWizardDialog::generateProfileName(const QString &name, const QString &path)
|
||||
{
|
||||
const QString proFile =
|
||||
|
||||
Reference in New Issue
Block a user