From 4fd0f1cf23412665495030b7c320065c7cd34409 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 17 Oct 2024 16:10:58 +0200 Subject: [PATCH] Wizards: Fix Kit selection for Qt 6.5 cmake projects Fixes: QTCREATORBUG-31852 Change-Id: I60076435ced9febb92b29ccbb57c65602f9284e4 Reviewed-by: Eike Ziller --- .../templates/wizards/projects/consoleapp/wizard.json | 8 ++++++-- .../wizards/projects/qtwidgetsapplication/wizard.json | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/share/qtcreator/templates/wizards/projects/consoleapp/wizard.json b/share/qtcreator/templates/wizards/projects/consoleapp/wizard.json index 759ec220f85..a8db1e5dafc 100644 --- a/share/qtcreator/templates/wizards/projects/consoleapp/wizard.json +++ b/share/qtcreator/templates/wizards/projects/consoleapp/wizard.json @@ -19,7 +19,8 @@ { "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" }, { "key": "MesonFile", "value": "%{ProjectDirectory}/meson.build" }, { "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" }, - { "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" } + { "key": "CppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }, + { "key": "FeatureQt", "value": "QtSupport.Wizards.FeatureQt%{JS: value('BuildSystem') === 'cmake-qt6' ? '.6.5' : ''}" } ], "pages": @@ -86,7 +87,10 @@ "trDisplayName": "Kit Selection", "trShortTitle": "Kits", "typeId": "Kits", - "data": { "projectFilePath": "%{ProjectFile}" } + "data": { + "projectFilePath": "%{ProjectFile}", + "requiredFeatures": [ "%{FeatureQt}"] + } }, { "trDisplayName": "Project Management", diff --git a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json index de20629065d..f9bee5e081c 100644 --- a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json @@ -25,9 +25,9 @@ { "key": "UiHdrFileName", "value": "%{JS: (value('BuildSystem') === 'cmake' ? (Util.path(value('FormFileName')) + '/') : '') + 'ui_' + Util.completeBaseName(value('FormFileName')) + '.h'}" }, { "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" }, { "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" }, - { "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" } + { "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }, + { "key": "FeatureQt", "value": "QtSupport.Wizards.FeatureQt%{JS: value('BuildSystem') === 'cmake-qt6' ? '.6.5' : ''}" } ], - "pages": [ { @@ -165,7 +165,10 @@ "trDisplayName": "Kit Selection", "trShortTitle": "Kits", "typeId": "Kits", - "data": { "projectFilePath": "%{ProjectFile}" } + "data": { + "projectFilePath": "%{ProjectFile}", + "requiredFeatures": [ "%{FeatureQt}"] + } }, { "trDisplayName": "Project Management",