diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2023-07-21 14:55:06 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2023-07-21 19:54:17 +0000 |
commit | 8e7dee1c9a7a0dc29eec7c5339cb77382dccb58f (patch) | |
tree | dad606ae8755749d46d79e105b36eb6892c2a5c3 /src | |
parent | 35837e5b25d98a417e5724ae5b41939eb2cc4854 (diff) |
Loader: Fix product id scope again
There's the product's scope and the scope for the product's child items,
which are not related. The ids need to be in both.
Amends 1410d1f12fb99fb8ab82fe3c2969bc18445a1165.
Change-Id: I08b5ccc803818bd6c519ea4b5946dbbac740bdad
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/corelib/loader/productscollector.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/corelib/loader/productscollector.cpp b/src/lib/corelib/loader/productscollector.cpp index 340398016..1c93f175f 100644 --- a/src/lib/corelib/loader/productscollector.cpp +++ b/src/lib/corelib/loader/productscollector.cpp @@ -351,11 +351,13 @@ void ProductsCollector::Private::prepareProduct(ProjectContext &projectContext, for (Item * const child : productItem->children()) { if (child->id().isEmpty()) continue; - if (productItem->scope() == productContext.project->scope) { + if (productItem->scope() == productContext.project->scope) { productItem->setScope(Item::create(productItem->pool(), ItemType::Scope)); productItem->scope()->setScope(productContext.project->scope); } - productItem->scope()->setProperty(child->id(), ItemValue::create(child)); + const ItemValuePtr childValue = ItemValue::create(child); + productItem->scope()->setProperty(child->id(), childValue); + productContext.scope->setProperty(child->id(), childValue); } const bool hasExportItems = mergeExportItems(productContext); |