aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2024-01-12 16:14:44 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2024-01-18 16:37:02 +0000
commit5791190fca42c8e78c19ee921487be77ee395969 (patch)
treea7aa00c3cc8e899e5c202437ca0b318747fce632 /share
parent54a38fe94362eff0514e935cf6d2ba61e2e0a45b (diff)
DependenciesResolver: Don't attach properties on non-present modules
We used to do that anyway and then suppress the resulting exception, but that can lead to an unexpected state later. The sequence that triggered the linked bug was as follows: - load module via non-required dependency in other module - exchange placeholder item in the product item and try to attach non-existing property on the module instance - suppress the resulting exception (because the dependency was not required) and continue - load module again (required this time) on product level - exchange placeholder item again -> assertion, because we have a module instance instead of the expected placeholder Another way to fix this would have been to revert exchanging the placeholder item after encountering an error, but that would be more complex, and there is no reason to attach properties to non-existing modules anyway. Fixes: QBS-1776 Change-Id: I581a076d1d872616b186e4015873baeea211b647 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'share')
-rw-r--r--share/qbs/module-providers/__fallback/fallback.qbs2
1 files changed, 2 insertions, 0 deletions
diff --git a/share/qbs/module-providers/__fallback/fallback.qbs b/share/qbs/module-providers/__fallback/fallback.qbs
index 52a3f080a..349af3a52 100644
--- a/share/qbs/module-providers/__fallback/fallback.qbs
+++ b/share/qbs/module-providers/__fallback/fallback.qbs
@@ -46,6 +46,8 @@ Module {
property string theName: FileInfo.completeBaseName(filePath)
+ readonly property bool __fallback: true // Hack, please look away
+
Probes.PkgConfigProbe {
id: pkgConfigProbe
condition: pkgconfig.present