diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-10-09 16:26:44 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-30 16:53:36 +0100 |
commit | acc73fd24430df8fd3b9eb8c0736f868064f2fa4 (patch) | |
tree | 4acde802257b7adc6c46ea4438c7c38f81022673 | |
parent | 8446f078a9d79ebef56d083f43306e89499e61cc (diff) |
qmake: Load extra variables only if also loading pre-files
The extra variables only need to be applied once, when we
are loading the pro file (and hence are loding pre files),
not for every single pri/prf that's loaded as a result of that
(which do not load pre files themselves).
Change-Id: I3118694a8eeccf2dc32c4f62df754033fad13528
(cherry picked from qtbase/8e7dc25380dceebca094e092d9feb21ad167ba91)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r-- | src/linguist/shared/qmakeevaluator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index c1400445e..5f304f3be 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -1370,10 +1370,6 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( loadDefaults(); } - for (ProValueMap::ConstIterator it = m_extraVars.constBegin(); - it != m_extraVars.constEnd(); ++it) - m_valuemapStack.first().insert(it.key(), it.value()); - VisitReturn vr; m_handler->aboutToEval(currentProFile(), pro, type); @@ -1382,6 +1378,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( if (flags & LoadPreFiles) { setupProject(); + for (ProValueMap::ConstIterator it = m_extraVars.constBegin(); + it != m_extraVars.constEnd(); ++it) + m_valuemapStack.first().insert(it.key(), it.value()); + if ((vr = evaluateFeatureFile(QLatin1String("default_pre.prf"))) == ReturnError) goto failed; |