From b98d5822f503a49dc0648169174c0131ca1ffc30 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 29 Nov 2017 17:43:02 +0100 Subject: [PATCH] qbs build: Use the proper way to check the Qt version Doing this via the product condition silently switches the product off if Qt is too old, which will leave users wondering about the reason. Instead, use the long-supported version check functionality of the Depends item, which will result in a clear message in case of a failure. Also, move the check to QtcProduct. The version requirement is for all of QtCreator, not just the plugins. Change-Id: Id445823e0243f5ad3b7a0ccb747a90e4fb18889b Reviewed-by: Robert Loehning Reviewed-by: Jake Petroules --- qbs/imports/QtcPlugin.qbs | 3 --- qbs/imports/QtcProduct.qbs | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/qbs/imports/QtcPlugin.qbs b/qbs/imports/QtcPlugin.qbs index f72dd5b3526..25d7bcaa762 100644 --- a/qbs/imports/QtcPlugin.qbs +++ b/qbs/imports/QtcPlugin.qbs @@ -12,9 +12,6 @@ QtcProduct { property var pluginRecommends: [] property var pluginTestDepends: [] - property string minimumQtVersion: "5.6.2" - condition: QtcFunctions.versionIsAtLeast(Qt.core.version, minimumQtVersion) - targetName: QtcFunctions.qtLibraryName(qbs, name) destinationDirectory: qtc.ide_plugin_path diff --git a/qbs/imports/QtcProduct.qbs b/qbs/imports/QtcProduct.qbs index c6b130effe4..f7b53981264 100644 --- a/qbs/imports/QtcProduct.qbs +++ b/qbs/imports/QtcProduct.qbs @@ -20,6 +20,7 @@ Product { Depends { name: "cpp" } Depends { name: "qtc" } Depends { name: product.name + " dev headers"; required: false } + Depends { name: "Qt.core"; versionAtLeast: "5.6.2" } Properties { condition: Utilities.versionCompare(Qt.core.version, "5.7") < 0 @@ -36,8 +37,6 @@ Product { cpp.useCxxPrecompiledHeader: useNonGuiPchFile || useGuiPchFile cpp.visibility: "minimal" - Depends { name: "Qt.core" } - Group { fileTagsFilter: installTags qbs.install: install