aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-02-02 15:45:37 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2017-02-03 19:06:46 +0000
commitcc24eee67a2c06e2cdfb045e0ee65050b0a4d804 (patch)
tree06e33b96c64db4dc9d40e7e01e5f5db77c3eb472
parentd667ab7a47da33f4a142e5644b166fb3222acf26 (diff)
Fix command-line parsing bug with some tools
The -h option was not recognized. Change-Id: I8ee264f24646b4be01bbd9954d208f94b80c51cb Reviewed-by: Jake Petroules <jake.petroules@qt.io>
-rw-r--r--src/app/qbs-setup-android/commandlineparser.cpp2
-rw-r--r--src/app/qbs-setup-qt/commandlineparser.cpp2
-rw-r--r--src/app/qbs-setup-toolchains/commandlineparser.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/app/qbs-setup-android/commandlineparser.cpp b/src/app/qbs-setup-android/commandlineparser.cpp
index cecd44fc9..72bd6770a 100644
--- a/src/app/qbs-setup-android/commandlineparser.cpp
+++ b/src/app/qbs-setup-android/commandlineparser.cpp
@@ -72,7 +72,7 @@ void CommandLineParser::parse(const QStringList &commandLine)
while (!m_commandLine.isEmpty()) {
const QString arg = m_commandLine.first();
- if (!arg.startsWith(QLatin1String("--")))
+ if (!arg.startsWith(QLatin1Char('-')))
break;
m_commandLine.removeFirst();
if (arg == helpOptionShort() || arg == helpOptionLong())
diff --git a/src/app/qbs-setup-qt/commandlineparser.cpp b/src/app/qbs-setup-qt/commandlineparser.cpp
index 289386529..9a6a003f7 100644
--- a/src/app/qbs-setup-qt/commandlineparser.cpp
+++ b/src/app/qbs-setup-qt/commandlineparser.cpp
@@ -66,7 +66,7 @@ void CommandLineParser::parse(const QStringList &commandLine)
while (!m_commandLine.isEmpty()) {
const QString arg = m_commandLine.first();
- if (!arg.startsWith(QLatin1String("--")))
+ if (!arg.startsWith(QLatin1Char('-')))
break;
m_commandLine.removeFirst();
if (arg == helpOptionShort() || arg == helpOptionLong())
diff --git a/src/app/qbs-setup-toolchains/commandlineparser.cpp b/src/app/qbs-setup-toolchains/commandlineparser.cpp
index 498cabdc7..b1cbc9129 100644
--- a/src/app/qbs-setup-toolchains/commandlineparser.cpp
+++ b/src/app/qbs-setup-toolchains/commandlineparser.cpp
@@ -68,7 +68,7 @@ void CommandLineParser::parse(const QStringList &commandLine)
while (!m_commandLine.isEmpty()) {
const QString arg = m_commandLine.first();
- if (!arg.startsWith(QLatin1String("--")))
+ if (!arg.startsWith(QLatin1Char('-')))
break;
m_commandLine.removeFirst();
if (arg == helpOptionShort() || arg == helpOptionLong())