Commit 48f3e4cd authored by Alessandro Portale's avatar Alessandro Portale Committed by con

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
parent 770a6a79
......@@ -990,17 +990,19 @@ QStringList QtVersionManager::splitLine(const QString &line)
escape = !escape;
} else if (escape || line.at(i) != ' ') {
currentWord += line.at(i);
} else {
} else if (!currentWord.isEmpty()) {
results << currentWord;
currentWord.clear();;
currentWord.clear();
}
#else
if (escape) {
currentWord += line.at(i);
escape = false;
} else if (line.at(i) == ' ') {
results << currentWord;
currentWord.clear();
if (!currentWord.iSEmpty()) {
results << currentWord;
currentWord.clear();
}
} else if (line.at(i) == '\\') {
escape = true;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment