summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-07-31 14:10:07 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-08-01 16:45:37 +0200
commit52490534739ef510c01a8a3847104bfaa3466413 (patch)
tree172155eb44eb1a592f308e589c3cd1a698dfc18f
parentd77f76374a840e5b13530ee292819b5a67b92c89 (diff)
downloadqt-creator-52490534739ef510c01a8a3847104bfaa3466413.tar.gz
bring isEmpty() semantics in line with qmake
qmake doesn't check if there is exactly one empty element - be it because (theoretically) there can be no empty elements. Change-Id: I603f2a472c02d270eafd1b3f6f9adae4349b3af0 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rw-r--r--src/shared/proparser/qmakebuiltins.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/shared/proparser/qmakebuiltins.cpp b/src/shared/proparser/qmakebuiltins.cpp
index e6ec37c881..c271ff1c84 100644
--- a/src/shared/proparser/qmakebuiltins.cpp
+++ b/src/shared/proparser/qmakebuiltins.cpp
@@ -1322,15 +1322,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateConditionalFunction(
evalError(fL1S("isEmpty(var) requires one argument."));
return ReturnFalse;
}
- const ProStringList &sl = values(map(args.at(0)));
- if (sl.count() == 0) {
- return ReturnTrue;
- } else if (sl.count() > 0) {
- const ProString &var = sl.first();
- if (var.isEmpty())
- return ReturnTrue;
- }
- return ReturnFalse;
+ return returnBool(values(map(args.at(0))).isEmpty());
}
case T_EXISTS: {
if (args.count() != 1) {