aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/projectresolver.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-08-11 17:36:36 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-08-14 09:11:34 +0000
commit5fcddbfa4708bc19ed9808cbbce319b1c59cde54 (patch)
treec0ab7c47418cde91e844f4b6dae5b55e8f95e419 /src/lib/corelib/language/projectresolver.cpp
parentfe79dab20ef733216aa9fa724acd4c12017ceb52 (diff)
Make a Group's prefix default to the one of the parent group
This should be the most sensible default. [ChangeLog] Groups without a prefix now inherit the one of the parent group. Change-Id: Ieee94d1a0f5cb073def8db9feff8c1ca5ea1eacf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/language/projectresolver.cpp')
-rw-r--r--src/lib/corelib/language/projectresolver.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp
index d1d70e445..7813b9bac 100644
--- a/src/lib/corelib/language/projectresolver.cpp
+++ b/src/lib/corelib/language/projectresolver.cpp
@@ -670,7 +670,11 @@ void ProjectResolver::resolveGroup(Item *item, ProjectContext *projectContext)
patterns.append(files.takeAt(i));
}
GroupPtr group = ResolvedGroup::create();
- group->prefix = m_evaluator->stringValue(item, QLatin1String("prefix"));
+ bool prefixWasSet = false;
+ group->prefix = m_evaluator->stringValue(item, QLatin1String("prefix"), QString(),
+ &prefixWasSet);
+ if (!prefixWasSet && m_productContext->currentGroup)
+ group->prefix = m_productContext->currentGroup->prefix;
if (!group->prefix.isEmpty()) {
for (int i = files.count(); --i >= 0;)
files[i].prepend(group->prefix);