From 54a38fe94362eff0514e935cf6d2ba61e2e0a45b Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Thu, 11 Jan 2024 20:16:04 +0300 Subject: Fix qbspkgconfig Qt provider in case there is no Qt Our tests did not cover the case when there is obviously no Qt that come from this provider. Add this case and check that we only get the error about missing module but no error come from the provider. Fixes: QBS-1777 Change-Id: Id3e80fd54e1519c91be37346276fd781d9f81b0a Reviewed-by: Christian Kandeler --- share/qbs/imports/qbs/Probes/qbs-pkg-config-probe.js | 2 +- share/qbs/module-providers/qbspkgconfig.qbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/qbs/imports/qbs/Probes/qbs-pkg-config-probe.js b/share/qbs/imports/qbs/Probes/qbs-pkg-config-probe.js index ed75a027c..1fb3b26f5 100644 --- a/share/qbs/imports/qbs/Probes/qbs-pkg-config-probe.js +++ b/share/qbs/imports/qbs/Probes/qbs-pkg-config-probe.js @@ -87,7 +87,7 @@ function configure( result.packages = []; result.packagesByModuleName = {}; result.brokenPackages = []; - result.qtInfos = {}; + result.qtInfos = []; var options = {}; options.libDirs = libDirs; diff --git a/share/qbs/module-providers/qbspkgconfig.qbs b/share/qbs/module-providers/qbspkgconfig.qbs index 0c6c99293..45309c862 100644 --- a/share/qbs/module-providers/qbspkgconfig.qbs +++ b/share/qbs/module-providers/qbspkgconfig.qbs @@ -152,7 +152,7 @@ ModuleProvider { if (moduleName.startsWith("Qt")) { function setupQt(packageName, qtInfos) { - if (qtInfos === undefined) + if (qtInfos === undefined || qtInfos.length === 0) return []; var qtProviderDir = FileInfo.joinPaths(path, "Qt"); return SetupQt.doSetup(packageName, qtInfos, outputBaseDir, qtProviderDir); -- cgit v1.2.3