Fix command line parsing: Do return empty items.

Symbians Makefiles have a "# Command:" line in the header
which has two whitespaces in the middle. The line parsing bug
fixed by this commit lead to a discrepency of the
"Actual args" (without empty elements) and the "Parsed args"
(with empty elements, otherwise same to Actual args), and
thus to a call of qmake on each build.

Task-Number: QTBUG-15539
This commit is contained in:
Alessandro Portale
2010-11-25 18:06:04 +01:00
committed by con
parent 770a6a79f1
commit 48f3e4cd76

View File

@@ -990,17 +990,19 @@ QStringList QtVersionManager::splitLine(const QString &line)
escape = !escape; escape = !escape;
} else if (escape || line.at(i) != ' ') { } else if (escape || line.at(i) != ' ') {
currentWord += line.at(i); currentWord += line.at(i);
} else { } else if (!currentWord.isEmpty()) {
results << currentWord; results << currentWord;
currentWord.clear();; currentWord.clear();
} }
#else #else
if (escape) { if (escape) {
currentWord += line.at(i); currentWord += line.at(i);
escape = false; escape = false;
} else if (line.at(i) == ' ') { } else if (line.at(i) == ' ') {
if (!currentWord.iSEmpty()) {
results << currentWord; results << currentWord;
currentWord.clear(); currentWord.clear();
}
} else if (line.at(i) == '\\') { } else if (line.at(i) == '\\') {
escape = true; escape = true;
} else { } else {