make error() actually cancel execution in non-cumulative mode

Change-Id: I50289cdfe906c923076a4a2dc57f7ca35c8e9b90
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-07-31 15:12:36 +02:00
parent 986c953ac6
commit 76db45fafe
3 changed files with 4 additions and 3 deletions

View File

@@ -1296,8 +1296,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
if (!m_skipLevel) if (!m_skipLevel)
m_handler->fileMessage(fL1S("Project %1: %2") m_handler->fileMessage(fL1S("Project %1: %2")
.arg(function.toQString(m_tmp1).toUpper(), msg)); .arg(function.toQString(m_tmp1).toUpper(), msg));
// ### Consider real termination in non-cumulative mode return (func_t == T_ERROR && !m_cumulative) ? ReturnError : ReturnTrue;
return returnBool(func_t != T_ERROR);
} }
#ifdef PROEVALUATOR_FULL #ifdef PROEVALUATOR_FULL
case T_SYSTEM: { case T_SYSTEM: {

View File

@@ -1478,7 +1478,8 @@ ProStringList QMakeEvaluator::evaluateFunction(
m_valuemapStack.top()[ProString(QString::number(i+1))] = argumentsList[i]; m_valuemapStack.top()[ProString(QString::number(i+1))] = argumentsList[i];
} }
m_valuemapStack.top()[statics.strARGS] = args; m_valuemapStack.top()[statics.strARGS] = args;
oki = (visitProBlock(func.pro(), func.tokPtr()) != ReturnFalse); // True || Return VisitReturn vr = visitProBlock(func.pro(), func.tokPtr());
oki = (vr != ReturnFalse && vr != ReturnError); // True || Return
ret = m_returnValue; ret = m_returnValue;
m_returnValue.clear(); m_returnValue.clear();

View File

@@ -93,6 +93,7 @@ public:
enum VisitReturn { enum VisitReturn {
ReturnFalse, ReturnFalse,
ReturnTrue, ReturnTrue,
ReturnError,
ReturnBreak, ReturnBreak,
ReturnNext, ReturnNext,
ReturnReturn ReturnReturn