don't double-expand for() arguments

unlike in qmake, the arguments are already expanded at this point
(which is strictly speaking a bug for the iterator variable name),
so it is plain wrong to call doVariableReplace on them.
This commit is contained in:
Oswald Buddenhagen
2010-04-06 20:55:04 +02:00
parent 2af6e73c59
commit f269f86982

View File

@@ -2464,7 +2464,6 @@ ProItem::ProItemReturn ProFileEvaluator::Private::evaluateConditionalFunction(
loop.index = 0; loop.index = 0;
QString it_list; QString it_list;
if (args.count() == 1) { if (args.count() == 1) {
doVariableReplace(&args[0]);
it_list = args[0]; it_list = args[0];
if (args[0] != statics.strever) { if (args[0] != statics.strever) {
logMessage(format("for({var, list|var, forever|ever})" logMessage(format("for({var, list|var, forever|ever})"
@@ -2475,7 +2474,6 @@ ProItem::ProItemReturn ProFileEvaluator::Private::evaluateConditionalFunction(
} else { } else {
loop.variable = map(args.at(0)); loop.variable = map(args.at(0));
loop.oldVarVal = valuesDirect(loop.variable); loop.oldVarVal = valuesDirect(loop.variable);
doVariableReplace(&args[1]);
it_list = map(args.at(1)); it_list = map(args.at(1));
} }
loop.list = valuesDirect(it_list); loop.list = valuesDirect(it_list);