summaryrefslogtreecommitdiffstats
path: root/qmake/library
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-09-03 17:05:33 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-18 07:47:05 +0200
commitc3c4f1eb5301a4fda17a9a48012df45f9a0ee7a3 (patch)
treeb22e092cdafc5b63ac94e323747b94eb25bf1451 /qmake/library
parent2084b48a794966bbc0b51de690fa103cfef7e817 (diff)
remove the entirely insane whitespace compression
it was merely an artifact of using QString::simplified() on the unparsed (!) project code. there is no reason why anyone should actually rely on it, so just remove it. Change-Id: If9b957c4b1263f3990a2331f8851bb1c06154ea8 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'qmake/library')
-rw-r--r--qmake/library/qmakeparser.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/qmake/library/qmakeparser.cpp b/qmake/library/qmakeparser.cpp
index 04558b8e9b..cad9bca180 100644
--- a/qmake/library/qmakeparser.cpp
+++ b/qmake/library/qmakeparser.cpp
@@ -340,9 +340,8 @@ bool QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
int argc = 0;
int wordCount = 0; // Number of words in currently accumulated expression
int lastIndent = 0; // Previous line's indentation, to detect accidental continuation abuse
- bool putSpace = false; // Only ever true inside quoted string
bool lineMarked = true; // For in-expression markers
- ushort needSep = TokNewStr; // Complementary to putSpace: separator outside quotes
+ ushort needSep = TokNewStr; // Met unquoted whitespace
ushort quote = 0;
ushort term = 0;
@@ -494,10 +493,6 @@ bool QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
if (c == '$') {
if (*cur == '$') { // may be EOF, EOL, WS, '#' or '\\' if past end
cur++;
- if (putSpace) {
- putSpace = false;
- *ptr++ = ' ';
- }
FLUSH_LITERAL();
if (!lineMarked) {
lineMarked = true;
@@ -619,13 +614,6 @@ bool QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
} else if (quote) {
if (c == quote) {
quote = 0;
- if (putSpace) {
- putSpace = false;
- *ptr++ = ' ';
- }
- goto nextChr;
- } else if ((c == ' ' || c == '\t') && context != CtxPureValue) {
- putSpace = true;
goto nextChr;
} else if (c == '!' && ptr == xprPtr && context == CtxTest) {
m_invert ^= true;
@@ -793,10 +781,6 @@ bool QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
languageWarning(fL1S("Possible accidental line continuation"));
}
}
- if (putSpace) {
- putSpace = false;
- *ptr++ = ' ';
- }
*ptr++ = c;
nextChr:
if (cur == end)
@@ -807,7 +791,7 @@ bool QMakeParser::read(ProFile *pro, const QString &in, int line, SubGrammar gra
lineEnd:
if (lineCont) {
if (quote) {
- putSpace = true;
+ *ptr++ = ' ';
} else {
FLUSH_LITERAL();
needSep = TokNewStr;