summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-04-07 13:48:06 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-04-30 15:02:41 (GMT)
commit00c17e9b630366121116e360cd907c66dffd8fe6 (patch)
tree7a9166e5948b0310b7362055dce88ee7e7a515b0 /qmake
parent3d370ffe3a1344656f20695f5e911e8a29220db7 (diff)
downloadQt-00c17e9b630366121116e360cd907c66dffd8fe6.zip
Qt-00c17e9b630366121116e360cd907c66dffd8fe6.tar.gz
Qt-00c17e9b630366121116e360cd907c66dffd8fe6.tar.bz2
short-cut evaluation inside if() tests
this is consistent with the top-level scope evaluation. if() is undocumented and the old behavior would be pretty unexpected for anyone, so i feel free to break compatibility. Reviewed-by: joerg
Diffstat (limited to 'qmake')
-rw-r--r--qmake/project.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index e3ab79d..f4933f2 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -2383,12 +2383,9 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
if(d_off == d_len-1)
test += *(d+d_off);
if(!test.isEmpty()) {
- const bool success = doProjectTest(test, place);
- test = "";
- if(or_op)
- ret = ret || success;
- else
- ret = ret && success;
+ if (or_op != ret)
+ ret = doProjectTest(test, place);
+ test.clear();
}
if(*(d+d_off) == QLatin1Char(':')) {
or_op = false;