diff options
author | David Faure <david.faure@kdab.com> | 2014-01-31 09:49:58 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-08 10:52:54 +0100 |
commit | 9db6c67f5ce375ff14ad7576b67c6e96bc73b080 (patch) | |
tree | a283248326994444daf2ef773a7102a48df6e13d /src/corelib/kernel | |
parent | c8848a5e98b4298d552a077f02979f0afd33c071 (diff) |
Support --option in addition to -option for all builtin Qt commandline options.
In addition to being more common and consistent with QCommandLineParser, this
will make it possible to add the documentation for these options
in the QCommandLineParser-generated help output.
[ChangeLog][General] Builtin command-line options such as -reverse,
-session, -style etc. now all support double dash, e.g. --reverse,
--session, --style...
Change-Id: Ia2e22c854ccc6a9d7b863b1234317005bc822191
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 3118034b88..d5d964eaec 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -186,6 +186,8 @@ void QCoreApplicationPrivate::processCommandLineArguments() continue; } QByteArray arg = argv[i]; + if (arg.startsWith("--")) + arg.remove(0, 1); if (arg.startsWith("-qmljsdebugger=")) { qmljs_debug_arguments = QString::fromLocal8Bit(arg.right(arg.length() - 15)); } else if (arg == "-qmljsdebugger" && i < argc - 1) { |