diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-03-22 14:37:23 +0100 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2013-03-22 18:21:51 +0100 |
commit | 8ceb9e1368326b7ff7faf70f4700223d3cb23c19 (patch) | |
tree | 296018e1de307f2f0ff8fe76448917f264994a4c /src | |
parent | 97962d23a14cd09874e69796b5e21167de869bd2 (diff) | |
download | qtchooser-8ceb9e1368326b7ff7faf70f4700223d3cb23c19.tar.gz qtchooser-8ceb9e1368326b7ff7faf70f4700223d3cb23c19.tar.bz2 qtchooser-8ceb9e1368326b7ff7faf70f4700223d3cb23c19.zip |
argument -l is the same as -list-versions; double-dash is OK too
Linux users tend to be accustomed to GNU-style options. Now qtchooser
is agnostic about that.
Change-Id: Idb9731cf6892c183370d863e4261936dc21e9ac8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qtchooser/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qtchooser/main.cpp b/src/qtchooser/main.cpp index fb5eaa9..7208e98 100644 --- a/src/qtchooser/main.cpp +++ b/src/qtchooser/main.cpp @@ -118,7 +118,7 @@ private: int ToolWrapper::printHelp() { puts("Usage:\n" - " qtchooser { -list-versions | -print-env }\n" + " qtchooser { -l | -list-versions | -print-env }\n" " qtchooser -run-tool=<tool name> [-qt=<Qt version>] [program arguments]\n" " <executable name> [-qt=<Qt version>] [program arguments]\n" "\n" @@ -437,7 +437,10 @@ int main(int argc, char **argv) ++arg; if (*arg == '-') ++arg; - if (strcmp(arg, "list-versions") == 0) { + // double-dash arguments are OK too + if (*arg == '-') + ++arg; + if (strcmp(arg, "list-versions") == 0 || strcmp(arg, "l") == 0) { operatingMode = ListVersions; } else if (beginsWith(arg, "print-env")) { operatingMode = PrintEnvironment; |