summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-03 13:54:17 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-03 21:38:37 +0200
commit783181cfc11e995ad678237ebc0025a2a023c88c (patch)
treef1ff0c8aa397d44dd55cad89ba5db505ee282a59 /qmake
parentbc328f8ec316acc2961b49978831171654ddde2d (diff)
make split_value_list() even less sane again
contrary to what one may expect, it's actually *not* supposed to remove the meta-characters it interprets. luckily, this function is not used much any more ... Task-number: QTBUG-31877 Change-Id: I2b60f9b173140da78db2b07b596cc2e5f6e6d555 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/library/qmakeevaluator.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 01f008c3cf..09ea231684 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -276,6 +276,8 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil
ushort unicode = vals_data[x].unicode();
if (unicode == quote) {
quote = 0;
+ hadWord = true;
+ build += QChar(unicode);
continue;
}
switch (unicode) {
@@ -283,7 +285,7 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil
case '\'':
quote = unicode;
hadWord = true;
- continue;
+ break;
case ' ':
case '\t':
if (!quote) {
@@ -294,22 +296,23 @@ ProStringList QMakeEvaluator::split_value_list(const QString &vals, const ProFil
}
continue;
}
- build += QChar(unicode);
break;
case '\\':
if (x + 1 != vals_len) {
ushort next = vals_data[++x].unicode();
- if (next == '\'' || next == '"' || next == '\\')
+ if (next == '\'' || next == '"' || next == '\\') {
+ build += QChar(unicode);
unicode = next;
- else
+ } else {
--x;
+ }
}
// fallthrough
default:
hadWord = true;
- build += QChar(unicode);
break;
}
+ build += QChar(unicode);
}
if (hadWord)
ret << ProString(build).setSource(source);