forked from qt-creator/qt-creator
make visitProBlock() return the last condition's state
will need it later. eval() needs to be taught to ignore the return code, as qmake stupidly does. as a side effect, flow control statements inside eval() don't have an effect outside eval() any more, which is only sane. Change-Id: I924e9d687f693a224dd7fa73af4a9bc69247e2df Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
@@ -1017,10 +1017,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
|
||||
if (!pro)
|
||||
return ReturnFalse;
|
||||
m_locationStack.push(m_current);
|
||||
VisitReturn ret = visitProBlock(pro, pro->tokPtr());
|
||||
visitProBlock(pro, pro->tokPtr());
|
||||
m_current = m_locationStack.pop();
|
||||
pro->deref();
|
||||
return ret;
|
||||
return ReturnTrue; // This return value is not too useful, but that's qmake
|
||||
}
|
||||
case T_BREAK:
|
||||
if (m_skipLevel)
|
||||
|
||||
Reference in New Issue
Block a user