From 784c508be04c0d0e56becac2b1d3f701c6333aff Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 25 Nov 2010 18:06:04 +0100 Subject: [PATCH] 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 --- src/plugins/qt4projectmanager/qtversionmanager.cpp | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 6210500..32b3f23 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 { -- 1.7.0.2.msysgit.0