aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/corelib/loader/productscollector.cpp6
-rw-r--r--tests/auto/language/testdata/probes-and-multiplexing.qbs4
-rw-r--r--tests/auto/language/tst_language.cpp8
3 files changed, 16 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);
diff --git a/tests/auto/language/testdata/probes-and-multiplexing.qbs b/tests/auto/language/testdata/probes-and-multiplexing.qbs
index 0bc835b2d..38de08aee 100644
--- a/tests/auto/language/testdata/probes-and-multiplexing.qbs
+++ b/tests/auto/language/testdata/probes-and-multiplexing.qbs
@@ -8,4 +8,8 @@ Product {
property string archOut
configure: { archOut = archIn; }
}
+ Group {
+ name: "theGroup"
+ qbs.sysroot: "/" + theProbe.archOut
+ }
}
diff --git a/tests/auto/language/tst_language.cpp b/tests/auto/language/tst_language.cpp
index c74a6734f..554550299 100644
--- a/tests/auto/language/tst_language.cpp
+++ b/tests/auto/language/tst_language.cpp
@@ -2415,6 +2415,14 @@ void TestLanguage::probesAndMultiplexing()
.toString();
QVERIFY2(architectures.removeOne(arch), qPrintable(arch));
QCOMPARE(product->productProperties.value("archFromProbe").toString(), arch);
+ bool foundGroup = false;
+ for (const GroupPtr &group : product->groups) {
+ if (group->name == "theGroup") {
+ foundGroup = true;
+ QCOMPARE(group->properties->moduleProperty("qbs", "sysroot"), "/" + arch);
+ }
+ }
+ QVERIFY(foundGroup);
}
} catch (const ErrorInfo &e) {
exceptionCaught = true;