From 9b1c692d76204831b28400d0d3c4d4ea2eab535a Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Fri, 5 Jun 2020 10:33:56 -0400 Subject: [PATCH] Fixed #340: help and version should be command line output --- main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index ae78844..2d1ff39 100644 --- a/main.cpp +++ b/main.cpp @@ -137,19 +137,19 @@ int main(int argc, char *argv[]) if (!parser.parse (a.arguments ())) { - MessageBox::critical_message (nullptr, a.translate ("main", "Command line error"), parser.errorText ()); + std::cerr << parser.errorText().toLocal8Bit ().data () << std::endl; return -1; } else { if (parser.isSet (help_option)) { - MessageBox::information_message (nullptr, a.translate ("main", "Command line help"), parser.helpText ()); + parser.showHelp (-1); return 0; } else if (parser.isSet (version_option)) { - MessageBox::information_message (nullptr, a.translate ("main", "Application version"), a.applicationVersion ()); + parser.showVersion(); return 0; } }