forked from qt-creator/qt-creator
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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user