make messages from dynamic code tell a useful location

"(eval)" does not exactly help to find the error source.

Change-Id: Iecd03e6a4909ca6d7eab846844ca4415ebfa3429
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-08-22 11:19:54 +02:00
parent 26e9f25a3e
commit 00e9be4246
8 changed files with 26 additions and 18 deletions

View File

@@ -1160,8 +1160,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
#endif
case T_EVAL: {
VisitReturn ret = ReturnFalse;
ProFile *pro = m_parser->parsedProBlock(fL1S("(eval)"),
args.join(statics.field_sep));
ProFile *pro = m_parser->parsedProBlock(args.join(statics.field_sep),
m_current.pro->fileName(), m_current.line);
if (pro) {
if (m_cumulative || pro->isOk()) {
m_locationStack.push(m_current);
@@ -1192,7 +1192,8 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
evalError(fL1S("if(condition) requires one argument."));
return ReturnFalse;
}
return returnBool(evaluateConditional(args.at(0).toQString(), fL1S("(if)")));
return returnBool(evaluateConditional(args.at(0).toQString(),
m_current.pro->fileName(), m_current.line));
}
case T_CONFIG: {
if (args.count() < 1 || args.count() > 2) {