diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-14 15:50:18 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2014-11-27 09:34:29 +0100 |
commit | 09e674849a40f5eb7e9f95fd2a952c621aec86d1 (patch) | |
tree | 38b4f908802778887e653442553be24cea4afaed /examples | |
parent | c124ac42c779900b22c413ea629a4ff3f284d2ba (diff) |
QCommandLineParser: Show usage and errors in message boxes on Windows.
Use the Windows MessageBox API if no console window can be obtained.
[ChangeLog][QtCore][QCommandLineParser] Message boxes are used
to display errors and usage if no console window can be obtained
on Windows.
Change-Id: I63ee8e4d8bd78db83e688fd69374779102562aa3
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/widgets/gestures/imagegestures/main.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/examples/widgets/gestures/imagegestures/main.cpp b/examples/widgets/gestures/imagegestures/main.cpp index 80f275bd5f..5fca0d6895 100644 --- a/examples/widgets/gestures/imagegestures/main.cpp +++ b/examples/widgets/gestures/imagegestures/main.cpp @@ -82,14 +82,7 @@ int main(int argc, char *argv[]) "qt.examples.imagegestures.debug=true\n"); commandLineParser.setApplicationDescription(description); - if (!commandLineParser.parse(QCoreApplication::arguments())) { - showHelp(commandLineParser, commandLineParser.errorText()); - return -1; - } - if (commandLineParser.isSet(helpOption)) { - showHelp(commandLineParser); - return 0; - } + commandLineParser.process(QCoreApplication::arguments()); QStringList arguments = commandLineParser.positionalArguments(); if (!arguments.isEmpty() && !QFileInfo(arguments.front()).isDir()) { |