From 9a8d74de0abdc87b099e1885f2865e16f104d6d8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 24 Jul 2012 17:09:14 +0200 Subject: [PATCH] remove second argument from $$eval() (access to global scope) sam added this based on a vague notion of backwards compatibility when he fixed the function to use the local scope, but it kind of makes no sense - there is very little reason for accessing the global scope from within a function. google doesn't find any relevant hits except our source code, so let's just nuke it. Change-Id: Ie957bb47b531f7e9b5dfcceb4e09f65dd826b422 Reviewed-by: Joerg Bornemann --- qmake/project.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index 0681697a96a..61140e9acbf 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -2283,23 +2283,12 @@ QMakeProject::doProjectExpand(QString func, QList args_list, } break; } case E_EVAL: { - if(args.count() < 1 || args.count() > 2) { + if (args.count() != 1) { fprintf(stderr, "%s:%d: eval(variable) requires one argument.\n", parser.file.toLatin1().constData(), parser.line_no); } else { - const QHash *source = &place; - if(args.count() == 2) { - if(args.at(1) == "Global") { - source = &vars; - } else if(args.at(1) == "Local") { - source = &place; - } else { - fprintf(stderr, "%s:%d: unexpected source to eval.\n", parser.file.toLatin1().constData(), - parser.line_no); - } - } - ret += source->value(args.at(0)); + ret += place.value(args.at(0)); } break; } case E_LIST: {