mirror of https://github.com/mgba-emu/mgba.git
Qt: Parse --version flag
This commit is contained in:
parent
598dbff32f
commit
a36e4157c0
|
@ -61,9 +61,17 @@ int main(int argc, char* argv[]) {
|
||||||
mSubParser subparser;
|
mSubParser subparser;
|
||||||
initParserForGraphics(&subparser, &graphicsOpts);
|
initParserForGraphics(&subparser, &graphicsOpts);
|
||||||
bool loaded = configController.parseArguments(&args, argc, argv, &subparser);
|
bool loaded = configController.parseArguments(&args, argc, argv, &subparser);
|
||||||
if (loaded && args.showHelp) {
|
if (loaded) {
|
||||||
usage(argv[0], subparser.usage);
|
if (args.showHelp) {
|
||||||
return 0;
|
usage(argv[0], subparser.usage);
|
||||||
|
freeArguments(&args);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (args.showVersion) {
|
||||||
|
version(argv[0]);
|
||||||
|
freeArguments(&args);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QApplication::setApplicationName(projectName);
|
QApplication::setApplicationName(projectName);
|
||||||
|
|
Loading…
Reference in New Issue