summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprojectmanager
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2012-02-14 15:21:21 +0100
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2012-02-15 10:56:54 +0100
commit0f073e4a35963d05727871a31898eaf6daf59dc8 (patch)
tree173179bf4cea1155759e007085092eb32f3e8251 /src/plugins/qmlprojectmanager
parentc4b631f97575cca5921a0c8645428354dbcf6745 (diff)
downloadqt-creator-0f073e4a35963d05727871a31898eaf6daf59dc8.tar.gz
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>
Diffstat (limited to 'src/plugins/qmlprojectmanager')
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
index f2f27e9aa4..30a9003d31 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
@@ -93,11 +93,9 @@ QWizard *QmlProjectApplicationWizard::createWizardDialog(QWidget *parent,
{
QmlProjectApplicationWizardDialog *wizard = new QmlProjectApplicationWizardDialog(parent, wizardDialogParameters);
- wizard->setPath(wizardDialogParameters.defaultPath());
wizard->setProjectName(QmlProjectApplicationWizardDialog::uniqueProjectName(wizardDialogParameters.defaultPath()));
- foreach (QWizardPage *p, wizardDialogParameters.extensionPages())
- BaseFileWizard::applyExtensionPageShortTitle(wizard, wizard->addPage(p));
+ wizard->addExtensionPages(wizardDialogParameters.extensionPages());
return wizard;
}