summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/wizards
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@nokia.com>2011-10-17 14:18:40 +0200
committerDaniel Teske <daniel.teske@nokia.com>2011-10-20 11:58:37 +0200
commitd2243c9765b2c7d917ab2d078e412d72f53bd959 (patch)
tree32c6f1860bd6ed27860ce7c412d5fe3717a0b95e /src/plugins/qt4projectmanager/wizards
parent4565c12f2bc9476858f53f2595647265bd43c5ee (diff)
downloadqt-creator-d2243c9765b2c7d917ab2d078e412d72f53bd959.tar.gz
Add a maximum Qt Version to the wizards
All existing wizards derived from AbstractMobileWizard do not support qt 5. So they won't offer them, nor default to them. Task-number: QTCREATORBUG-6321 Change-Id: I999e2565cec5b0d7da04c10e38ac2cb101352e5b Reviewed-by: Alessandro Portale <alessandro.portale@nokia.com>
Diffstat (limited to 'src/plugins/qt4projectmanager/wizards')
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp5
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h2
-rw-r--r--src/plugins/qt4projectmanager/wizards/html5appwizard.cpp3
-rw-r--r--src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp12
-rw-r--r--src/plugins/qt4projectmanager/wizards/targetsetuppage.h4
7 files changed, 23 insertions, 7 deletions
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
index b1c6f12187..3e2913a911 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
@@ -49,7 +49,9 @@
namespace Qt4ProjectManager {
-AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent, const QtSupport::QtVersionNumber &minimumQtVersionNumber)
+AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent,
+ const QtSupport::QtVersionNumber &minimumQtVersionNumber,
+ const QtSupport::QtVersionNumber &maximumQtVersionNumber)
: ProjectExplorer::BaseProjectWizardDialog(parent)
, m_genericOptionsPageId(-1)
, m_symbianOptionsPageId(-1)
@@ -66,6 +68,7 @@ AbstractMobileAppWizardDialog::AbstractMobileAppWizardDialog(QWidget *parent, co
m_targetsPage = new TargetSetupPage;
m_targetsPage->setPreferredFeatures(QSet<QString>() << Constants::MOBILE_TARGETFEATURE_ID);
m_targetsPage->setMinimumQtVersion(minimumQtVersionNumber);
+ m_targetsPage->setMaximumQtVersion(maximumQtVersionNumber);
resize(900, 450);
m_genericOptionsPage = new Internal::MobileAppWizardGenericOptionsPage;
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
index f4aff8058d..2439cf3950 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.h
@@ -57,7 +57,7 @@ class QT4PROJECTMANAGER_EXPORT AbstractMobileAppWizardDialog : public ProjectExp
Q_OBJECT
protected:
- explicit AbstractMobileAppWizardDialog(QWidget *parent, const QtSupport::QtVersionNumber &minimumQtVersionNumber);
+ explicit AbstractMobileAppWizardDialog(QWidget *parent, const QtSupport::QtVersionNumber &minimumQtVersionNumber, const QtSupport::QtVersionNumber &maximumQtVersionNumber);
void addMobilePages();
public:
diff --git a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
index 178dc934c1..1b1100f40f 100644
--- a/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/html5appwizard.cpp
@@ -38,6 +38,7 @@
#include "targetsetuppage.h"
#include "qt4projectmanagerconstants.h"
+#include <limits>
#include <QtCore/QCoreApplication>
#include <QtGui/QIcon>
@@ -58,7 +59,7 @@ private:
};
Html5AppWizardDialog::Html5AppWizardDialog(QWidget *parent)
- : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber())
+ : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(), QtSupport::QtVersionNumber(4, INT_MAX, INT_MAX))
, 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 533ba09e38..78081df8a8 100644
--- a/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/mobileappwizard.cpp
@@ -60,7 +60,7 @@ class MobileAppWizardDialog : public AbstractMobileAppWizardDialog
Q_OBJECT
public:
explicit MobileAppWizardDialog(QWidget *parent = 0)
- : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber())
+ : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(), QtSupport::QtVersionNumber(4, INT_MAX, INT_MAX))
{
setWindowTitle(DisplayName);
setIntroDescription(Description);
diff --git a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
index 8a7cc42539..86d98ebe56 100644
--- a/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtquickappwizard.cpp
@@ -66,7 +66,7 @@ private:
};
QtQuickAppWizardDialog::QtQuickAppWizardDialog(QWidget *parent)
- : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(4, 7, 0))
+ : AbstractMobileAppWizardDialog(parent, QtSupport::QtVersionNumber(4, 7, 0), QtSupport::QtVersionNumber(4, INT_MAX, INT_MAX))
{
setWindowTitle(tr("New Qt Quick Application"));
setIntroDescription(tr("This wizard generates a Qt Quick application project."));
diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
index 9c15946f28..e692aa464b 100644
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
+++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
@@ -55,7 +55,8 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
QWizardPage(parent),
m_importSearch(false),
m_spacer(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding)),
- m_ui(new Internal::Ui::TargetSetupPage)
+ m_ui(new Internal::Ui::TargetSetupPage),
+ m_maximumQtVersionNumber(INT_MAX, INT_MAX, INT_MAX)
{
m_ui->setupUi(this);
QWidget *centralWidget = new QWidget(this);
@@ -112,6 +113,11 @@ void TargetSetupPage::setMinimumQtVersion(const QtSupport::QtVersionNumber &numb
m_minimumQtVersionNumber = number;
}
+void TargetSetupPage::setMaximumQtVersion(const QtSupport::QtVersionNumber &number)
+{
+ m_maximumQtVersionNumber = number;
+}
+
void TargetSetupPage::setImportSearch(bool b)
{
m_importSearch = b;
@@ -129,7 +135,9 @@ void TargetSetupPage::setupWidgets()
QList<BuildConfigurationInfo> infos = BuildConfigurationInfo::filterBuildConfigurationInfos(m_importInfos, id);
Qt4TargetSetupWidget *widget =
- factory->createTargetSetupWidget(id, m_proFilePath, m_minimumQtVersionNumber, m_importSearch, infos);
+ factory->createTargetSetupWidget(id, m_proFilePath,
+ m_minimumQtVersionNumber, m_maximumQtVersionNumber,
+ m_importSearch, infos);
if (widget) {
bool selectTarget = false;
if (!m_importInfos.isEmpty()) {
diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
index 066f796a76..197c4911a9 100644
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
+++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
@@ -81,6 +81,9 @@ public:
/// Sets the minimum qt version
/// calls this before \sa initializePage()
void setMinimumQtVersion(const QtSupport::QtVersionNumber &number);
+ /// Sets the maximum qt version
+ /// calls this before \sa initializePage()
+ void setMaximumQtVersion(const QtSupport::QtVersionNumber &number);
/// Sets whether the TargetSetupPage looks on disk for builds of this project
/// call this before \sa initializePage()
void setImportSearch(bool b);
@@ -102,6 +105,7 @@ private:
QSet<QString> m_requiredFeatures;
bool m_importSearch;
QtSupport::QtVersionNumber m_minimumQtVersionNumber;
+ QtSupport::QtVersionNumber m_maximumQtVersionNumber;
QString m_proFilePath;
QString m_defaultShadowBuildLocation;
QMap<QString, Qt4TargetSetupWidget *> m_widgets;