From 09e674849a40f5eb7e9f95fd2a952c621aec86d1 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 14 Nov 2014 15:50:18 +0100 Subject: 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 --- examples/widgets/gestures/imagegestures/main.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'examples/widgets') 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()) { -- cgit v1.2.3