From cd210664697e144cc7b2eb57fb006f68f68a0c91 Mon Sep 17 00:00:00 2001
From: dt <qtc-committer@nokia.com>
Date: Tue, 12 Apr 2011 16:29:02 +0200
Subject: [PATCH] Fix minimum qt version for mobile/html wizard

That was broken by the TargetSetupPage refactoring

Task-Nr: QTCREATORBUG-4486
Reviewed-By: ck
---
 .../qt4projectmanager/wizards/abstractmobileappwizard.cpp     | 4 ++--
 .../qt4projectmanager/wizards/abstractmobileappwizard.h       | 3 ++-
 src/plugins/qt4projectmanager/wizards/html5appwizard.cpp      | 2 +-
 src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp     | 2 +-
 src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp    | 2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
index 4a7932b2e0e..a36e0c4ffc5 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
@@ -49,12 +49,12 @@
 
 namespace Qt4ProjectManager {
 
-AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent)
+AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent, const QtVersionNumber &minimumQtVersionNumber)
     : ProjectExplorer::BaseProjectWizardDialog(parent)
 {
     m_targetsPage = new TargetSetupPage;
     m_targetsPage->setPreferMobile(true);
-    m_targetsPage->setMinimumQtVersion(QtVersionNumber(4,7,0));
+    m_targetsPage->setMinimumQtVersion(minimumQtVersionNumber);
     resize(900, 450);
     m_targetsPageId = addPageWithTitle(m_targetsPage, tr("Qt Versions"));
     m_genericOptionsPage = new Internal::MobileAppWizardGenericOptionsPage;
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
index ebf899368bd..4c14bd0cb06 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
@@ -35,6 +35,7 @@
 #define ABSTRACTMOBILEAPPWIZARD_H
 
 #include <qt4projectmanager/qt4projectmanager_global.h>
+#include <qt4projectmanager/qtversionmanager.h>
 #include <coreplugin/basefilewizard.h>
 #include <projectexplorer/baseprojectwizarddialog.h>
 
@@ -55,7 +56,7 @@ class QT4PROJECTMANAGER_EXPORT AbstractMobileAppWizardDialog : public ProjectExp
     Q_OBJECT
 
 protected:
-    explicit AbstractMobileAppWizardDialog(QWidget *parent = 0);
+    explicit AbstractMobileAppWizardDialog(QWidget *parent, const QtVersionNumber &minimumQtVersionNumber);
 
 public:
     TargetSetupPage *targetsPage() const;
diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
index 13fbdadd576..c7e98869453 100644
--- a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
@@ -59,7 +59,7 @@ private:
 };
 
 Html5AppWizardDialog::Html5AppWizardDialog(QWidget *parent)
-    : AbstractMobileAppWizardDialog(parent)
+    : AbstractMobileAppWizardDialog(parent, QtVersionNumber())
     , m_htmlOptionsPage(0)
 {
     setWindowTitle(tr("New HTML5 Application"));
diff --git a/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp
index 7a3ff713416..8278fd20896 100644
--- a/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp
@@ -61,7 +61,7 @@ class MobileAppWizardDialog : public AbstractMobileAppWizardDialog
     Q_OBJECT
 public:
     explicit MobileAppWizardDialog(QWidget *parent = 0)
-        : AbstractMobileAppWizardDialog(parent)
+        : AbstractMobileAppWizardDialog(parent, QtVersionNumber())
     {
         setWindowTitle(DisplayName);
         setIntroDescription(Description);
diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
index 5501ff1e518..066fa1b3928 100644
--- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
@@ -59,7 +59,7 @@ private:
 };
 
 QtQuickAppWizardDialog::QtQuickAppWizardDialog(QWidget *parent)
-    : AbstractMobileAppWizardDialog(parent)
+    : AbstractMobileAppWizardDialog(parent, QtVersionNumber(4, 7, 1))
     , m_qmlSourcesPage(0)
 {
     setWindowTitle(tr("New Qt Quick Application"));
-- 
GitLab