aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/corelib/language/moduleloader.cpp3
-rw-r--r--tests/auto/blackbox/testdata/nested-groups/modules/themodule/themodule.qbs1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp
index b2bbd24d7..b06f17806 100644
--- a/src/lib/corelib/language/moduleloader.cpp
+++ b/src/lib/corelib/language/moduleloader.cpp
@@ -2351,9 +2351,10 @@ void ModuleLoader::copyGroupsFromModuleToProduct(const ProductContext &productCo
{
for (int i = 0; i < modulePrototype->children().count(); ++i) {
Item * const child = modulePrototype->children().at(i);
- if (child->typeName() == QLatin1String("Group")) {
+ if (child->type() == ItemType::Group) {
Item * const clonedGroup = child->clone();
clonedGroup->setScope(productContext.scope);
+ setScopeForDescendants(clonedGroup, productContext.scope);
Item::addChild(productContext.item, clonedGroup);
}
}
diff --git a/tests/auto/blackbox/testdata/nested-groups/modules/themodule/themodule.qbs b/tests/auto/blackbox/testdata/nested-groups/modules/themodule/themodule.qbs
index de15aa7c8..ffca11cdf 100644
--- a/tests/auto/blackbox/testdata/nested-groups/modules/themodule/themodule.qbs
+++ b/tests/auto/blackbox/testdata/nested-groups/modules/themodule/themodule.qbs
@@ -4,6 +4,7 @@ Module {
Group {
cpp.defines: ["REQUIRED_FOR_FILE3"]
Group {
+ prefix: product.sourceDirectory + '/'
files: ["file3.cpp", "file3.h"]
}
}