summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@nokia.com>2010-11-25 18:06:04 +0100
committercon <qtc-committer@nokia.com>2010-12-06 11:56:57 +0100
commit48f3e4cd767d0217144374eb09237189914969dd (patch)
treece4ef3bcf059d3c6d82eb7b61d98b5b6991f348e
parent770a6a79f1142efaf8290f46981f9cc49166eb77 (diff)
downloadqt-creator-48f3e4cd767d0217144374eb09237189914969dd.tar.gz
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
-rw-r--r--src/plugins/qt4projectmanager/qtversionmanager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp
index 6210500994..32b3f2392d 100644
--- a/src/plugins/qt4projectmanager/qtversionmanager.cpp
+++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp
@@ -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 {