From 9db6c67f5ce375ff14ad7576b67c6e96bc73b080 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 31 Jan 2014 09:49:58 +0100 Subject: 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 Reviewed-by: Friedemann Kleint --- src/corelib/kernel/qcoreapplication.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/kernel/qcoreapplication.cpp') 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) { -- cgit v1.2.3