aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-02-13 17:44:06 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-02-16 09:52:44 +0000
commit59c61da6ec4027c0a52a57a6357f58a07f2e1a96 (patch)
tree6238faa0a6fa31e92abe457b325372fb15864cc5
parent5819a73fa013a16f68449c4d5be54fbcfbf82902 (diff)
Amend property evaluation optimization.v1.3.4
There is code further down in the chain (e.g. setupBuildEnvironment()) that expects the first module instance it finds to contain the right definition for all its properties. So make sure that is the case. Change-Id: I55f10d626f5be7ec8502f54e0b1a9673df0b5d93 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
-rw-r--r--src/lib/corelib/language/projectresolver.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/corelib/language/projectresolver.cpp b/src/lib/corelib/language/projectresolver.cpp
index cffe6b074..83d661c14 100644
--- a/src/lib/corelib/language/projectresolver.cpp
+++ b/src/lib/corelib/language/projectresolver.cpp
@@ -1183,11 +1183,13 @@ QVariantMap ProjectResolver::evaluateProperties(Item *item,
const bool isOwnProperty = std::binary_search(evalContext.ownProperties.constBegin(),
evalContext.ownProperties.constEnd(), it.key());
if (isPotentialGlobalEntry) {
- const QHash<QString, EvalResult>::ConstIterator it
+ const QHash<QString, EvalResult>::ConstIterator globalIt
= evalContext.globalResult->find(fullKey);
- if (it != evalContext.globalResult->constEnd()) {
- if (!isOwnProperty || it->strongPrecedence)
+ if (globalIt != evalContext.globalResult->constEnd()) {
+ if (!isOwnProperty || globalIt->strongPrecedence) {
+ result[it.key()] = globalIt->value;
break;
+ }
}
}