From a36e4157c0518a3883f4397fe14cc87811953e59 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 15 Apr 2021 20:38:58 -0700 Subject: [PATCH] Qt: Parse --version flag --- src/platform/qt/main.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/platform/qt/main.cpp b/src/platform/qt/main.cpp index e57c0903a..5dc302b1f 100644 --- a/src/platform/qt/main.cpp +++ b/src/platform/qt/main.cpp @@ -61,9 +61,17 @@ int main(int argc, char* argv[]) { mSubParser subparser; initParserForGraphics(&subparser, &graphicsOpts); bool loaded = configController.parseArguments(&args, argc, argv, &subparser); - if (loaded && args.showHelp) { - usage(argv[0], subparser.usage); - return 0; + if (loaded) { + if (args.showHelp) { + usage(argv[0], subparser.usage); + freeArguments(&args); + return 0; + } + if (args.showVersion) { + version(argv[0]); + freeArguments(&args); + return 0; + } } QApplication::setApplicationName(projectName);