aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-09-13 12:45:51 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-09-14 09:57:07 +0000
commitf204d98283ff6250302a89958ea43426c27f8046 (patch)
tree51812a9232665f779f83b38adc40ec163ecf009b
parent40d304808479ea72c1d02dacf007ab8b05851e2e (diff)
Qt support: Fix selection of Qt build variant
... when qbs.buildVariant is "profiling". Fixes: QBS-1758 Change-Id: Iae6e98af3b16860a5c8e5c20ebb52fac3127e9e8 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r--changelogs/changes-2.1.2.md3
-rw-r--r--share/qbs/module-providers/Qt/templates/core.qbs2
2 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/changes-2.1.2.md b/changelogs/changes-2.1.2.md
index 7b059e10d..b83ecdbf5 100644
--- a/changelogs/changes-2.1.2.md
+++ b/changelogs/changes-2.1.2.md
@@ -3,6 +3,9 @@
* Fixed scope pollution and potential crash when assigning to provider properties (QBS-1747).
* Fixed potential access to freed JSValues (QBS-1751).
+# Qt
+* Fixed building against Qt with "profiling" build variant (QBS-1758).
+
# Apple
* Fixed bundle module with Xcode-less profiles.
* Fixed ApplicationExtension with Xcode-less profiles.
diff --git a/share/qbs/module-providers/Qt/templates/core.qbs b/share/qbs/module-providers/Qt/templates/core.qbs
index b980588ff..ca978eae5 100644
--- a/share/qbs/module-providers/Qt/templates/core.qbs
+++ b/share/qbs/module-providers/Qt/templates/core.qbs
@@ -76,6 +76,8 @@ Module {
property string qtBuildVariant: {
if (availableBuildVariants.contains(qbs.buildVariant))
return qbs.buildVariant;
+ if (qbs.buildVariant === "profiling" && availableBuildVariants.contains("release"))
+ return "release";
return availableBuildVariants.length > 0 ? availableBuildVariants[0] : "";
}