From 8e7dee1c9a7a0dc29eec7c5339cb77382dccb58f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 21 Jul 2023 14:55:06 +0200 Subject: 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 --- src/lib/corelib/loader/productscollector.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3