forked from qt-creator/qt-creator
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 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> (cherry picked from qtbase/8e7dc25380dceebca094e092d9feb21ad167ba91) Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
committed by
Oswald Buddenhagen
parent
dd2425eb02
commit
aa94bee7fd
@@ -1358,10 +1358,6 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
|||||||
loadDefaults();
|
loadDefaults();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ProValueMap::ConstIterator it = m_extraVars.constBegin();
|
|
||||||
it != m_extraVars.constEnd(); ++it)
|
|
||||||
m_valuemapStack.first().insert(it.key(), it.value());
|
|
||||||
|
|
||||||
VisitReturn vr;
|
VisitReturn vr;
|
||||||
|
|
||||||
m_handler->aboutToEval(currentProFile(), pro, type);
|
m_handler->aboutToEval(currentProFile(), pro, type);
|
||||||
@@ -1370,6 +1366,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
|||||||
if (flags & LoadPreFiles) {
|
if (flags & LoadPreFiles) {
|
||||||
setupProject();
|
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)
|
if ((vr = evaluateFeatureFile(QLatin1String("default_pre.prf"))) == ReturnError)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user