aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2016-11-22 18:30:21 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2016-11-23 13:45:25 +0000
commitdabf95dd4b3a3955bd62bad09c089d0948b258fd (patch)
tree43fee8c1542526000a68535e29d15bf119311e7b
parente403825270904a4fa703ae9a92190c0b5b5fe39b (diff)
Set product scope in nested groups from modules
This was forgotten when we introduced nested groups. Change-Id: I824cba8c7958902268f188b5a3009d7e252fc39a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-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"]
}
}