From 9ecc7b356b8c6ef362483b423b5a21119a7440d5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 14 Jun 2022 13:44:56 +0200 Subject: [PATCH] QtSupport: Make sure Qt 6 matches a Qt 5 version requirement ... of a wizard. For example, the QtQuick application wizard specifies "Qt.5.6" as a required feature, which has the implicit semantics of "Qt 5.6 or higher". On the C++ side, a QtVersion adds its exact version x.y plus all lower ones down to x.0, in an attempt to somehow implement versioning semantics using tags. This means that versions 6.0 and higher did not fulfill the 5.6 requirement anymore, which was very likely not the intention. We therefore extend the mechanism to major version x-1, though in the future we should probably come up with a less absurd approach. Fixes: QTCREATORBUG-27612 Change-Id: I41d60809a02f0caddba7e702c91c01e86ecbd4ac Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Eike Ziller --- src/plugins/qtsupport/baseqtversion.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index c2460fd1290..ea74600c520 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -157,6 +157,10 @@ static QSet versionedIds(const QByteArray &prefix, int major, int minor) result.insert(Id::fromName(featureDotMajor + '.' + minorStr)); } + // FIXME: Terrible hack. Get rid of using version numbers as tags! + if (major > 5) + result.unite(versionedIds(prefix, major - 1, 15)); + return result; }