forked from qt-creator/qt-creator
Add "Minimal required Qt version: Qt 6" option to QQ application wizards
Provide a Qt 6 option that does not use any versioned imports. Also make Qt 5.15 the new default. Fixes: QTCREATORBUG-24973 Change-Id: I43714e5e344d1d91d35c5ad298edf28bc32ff7d6 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
|
||||
{ "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
|
||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
||||
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQtQuick.6' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
|
||||
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
|
||||
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
|
||||
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||
@@ -83,9 +83,18 @@
|
||||
"persistenceKey": "QtQuick.minimumQtVersion",
|
||||
"data":
|
||||
{
|
||||
"index": 3,
|
||||
"index": 1,
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"trKey": "Qt 6",
|
||||
"value":
|
||||
{
|
||||
"QtQuickVersion": "",
|
||||
"QtQuickWindowVersion": "",
|
||||
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"trKey": "Qt 5.15",
|
||||
"value":
|
||||
|
@@ -22,7 +22,7 @@
|
||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
|
||||
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
|
||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
||||
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQtQuick.6' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
|
||||
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
|
||||
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
|
||||
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||
@@ -85,9 +85,18 @@
|
||||
"persistenceKey": "QtQuick.minimumQtVersion",
|
||||
"data":
|
||||
{
|
||||
"index": 3,
|
||||
"index": 1,
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"trKey": "Qt 6",
|
||||
"value":
|
||||
{
|
||||
"QtQuickVersion": "",
|
||||
"QtQuickControlsVersion": "",
|
||||
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"trKey": "Qt 5.15",
|
||||
"value":
|
||||
|
@@ -22,7 +22,7 @@
|
||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
|
||||
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
|
||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
||||
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQtQuick.6' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
|
||||
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
|
||||
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
|
||||
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||
@@ -85,9 +85,18 @@
|
||||
"persistenceKey": "QtQuick.minimumQtVersion",
|
||||
"data":
|
||||
{
|
||||
"index": 3,
|
||||
"index": 1,
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"trKey": "Qt 6",
|
||||
"value":
|
||||
{
|
||||
"QtQuickVersion": "",
|
||||
"QtQuickControlsVersion": "",
|
||||
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"trKey": "Qt 5.15",
|
||||
"value":
|
||||
|
@@ -22,7 +22,7 @@
|
||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||
{ "key": "QtQuickControlsStyle", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyle}" },
|
||||
{ "key": "QtQuickControlsStyleTheme", "value": "%{JS: value('ControlsStyle').QtQuickControlsStyleTheme}" },
|
||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
||||
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQtQuick.6' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
|
||||
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
|
||||
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
|
||||
{ "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
|
||||
@@ -85,9 +85,18 @@
|
||||
"persistenceKey": "QtQuick.minimumQtVersion",
|
||||
"data":
|
||||
{
|
||||
"index": 3,
|
||||
"index": 1,
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"trKey": "Qt 6",
|
||||
"value":
|
||||
{
|
||||
"QtQuickVersion": "",
|
||||
"QtQuickControlsVersion": "",
|
||||
"QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
"trKey": "Qt 5.15",
|
||||
"value":
|
||||
|
@@ -17,7 +17,7 @@
|
||||
{ "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
|
||||
{ "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
|
||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
|
||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
||||
{ "key": "QtQuickFeature", "value": "%{JS: (value('QtQuickVersion')=='') ? 'QtSupport.Wizards.FeatureQtQuick.6' : 'QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}'}" },
|
||||
{ "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" }
|
||||
],
|
||||
|
||||
@@ -40,9 +40,18 @@
|
||||
"type": "ComboBox",
|
||||
"data":
|
||||
{
|
||||
"index": 3,
|
||||
"index": 1,
|
||||
"items":
|
||||
[
|
||||
{
|
||||
"trKey": "Qt 6",
|
||||
"value":
|
||||
{
|
||||
"QtQuickVersion": "",
|
||||
"QtQuickWindowVersion": "",
|
||||
"QtQuickVirtualKeyboardImport": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"trKey": "Qt 5.15",
|
||||
"value":
|
||||
|
@@ -495,6 +495,10 @@ QSet<Id> BaseQtVersion::availableFeatures() const
|
||||
if (qtVersion().matches(5, 15))
|
||||
return features;
|
||||
|
||||
// Qt 6 uses versionless imports
|
||||
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_PREFIX, 6, -1));
|
||||
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_CONTROLS_2_PREFIX, 6, -1));
|
||||
|
||||
return features;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user