From f36e79cfa2bc75adba339220011b8ddd42ec2c9d Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 8 Jul 2015 17:52:50 +0200 Subject: [PATCH] QtQuick*Wizards: Do never show an empty version dropdown Always list all minimum Qt version options and pick the lowest by default. The wizard will be listed with no platform set and needs to do something then. Before it did show an empty combobox and behaved oddly from that point on when no kit with a Qt >= 5.3 was found. Now it lists all possible versions and offers to set up kits for you via the kits page when no matching kit is available. Change-Id: I978268a2b8f1dfcfc8640460d905652abe91f1ae Reviewed-by: Christian Stenger --- .../projects/qmake/qtquickapplication/wizard.json | 14 ++++++-------- .../qmake/qtquickcontrolsapplication/wizard.json | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json index d633eddf6bf..ff84948f890 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json @@ -7,8 +7,8 @@ "trDisplayName": "Qt Quick Application", "trDisplayCategory": "Application", "icon": "qml_wizard.png", - "featuresRequired": [ "QtSupport.Wizards.FeatureQt", "QtSupport.Wizards.FeatureQtQuick.2" ], - "enabled": "${JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 && [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0}", + "featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.3" ], + "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 }", "options": [ @@ -38,6 +38,7 @@ "type": "ComboBox", "data": { + "index": 2, "items": [ { @@ -46,8 +47,7 @@ "{ 'qtQuickVersion': '2.5', 'qtQuickWindowVersion': '2.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.5') >= 0}" + }" }, { "trKey": "Qt 5.4", @@ -55,8 +55,7 @@ "{ 'qtQuickVersion': '2.4', 'qtQuickWindowVersion': '2.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.4') >= 0}" + }" }, { "trKey": "Qt 5.3", @@ -64,8 +63,7 @@ "{ 'qtQuickVersion': '2.3', 'qtQuickWindowVersion': '2.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0}" + }" } ] } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json index 7738f28e5ac..0a57e21bf3b 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json @@ -7,8 +7,8 @@ "trDisplayName": "Qt Quick Controls Application", "trDisplayCategory": "Application", "icon": "../qtquickapplication/qml_wizard.png", - "featuresRequired": [ "QtSupport.Wizards.FeatureQt" ], - "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 && [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0 }", + "featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.3" ], + "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}", "options": [ @@ -40,6 +40,7 @@ "type": "ComboBox", "data": { + "index": 2, "items": [ { @@ -50,8 +51,7 @@ 'qtQuickControlsVersion': '1.4', 'qtQuickDialogsVersion': '1.2', 'qtQuickLayoutsVersion': '1.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.5') >= 0}" + }" }, { "trKey": "Qt 5.4", @@ -61,8 +61,7 @@ 'qtQuickControlsVersion': '1.3', 'qtQuickDialogsVersion': '1.2', 'qtQuickLayoutsVersion': '1.1' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.4') >= 0}" + }" }, { "trKey": "Qt 5.3", @@ -72,8 +71,7 @@ 'qtQuickControlsVersion': '1.2', 'qtQuickDialogsVersion': '1.2', 'qtQuickLayoutsVersion': '1.1' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0}" + }" } ] }