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;
|
||||
} 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 {
|
||||
|
||||
Reference in New Issue
Block a user