Add version option (maybe Ill stop forgetting now)
This commit is contained in:
parent
c76eeec89b
commit
9e2c588c9e
8
main.cpp
8
main.cpp
@ -40,9 +40,17 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
QCommandLineOption h({ "b", "background" }, "Does not show the main window, starts in tray.");
|
||||
QCommandLineOption v({ "v", "verbose" }, "Enables QtDebugMsg outputs");
|
||||
QCommandLineOption ver({ "ver", "version" }, "Prints KShare version");
|
||||
parser.addOption(h);
|
||||
parser.addOption(v);
|
||||
parser.addOption(ver);
|
||||
parser.process(a);
|
||||
|
||||
if (parser.isSet(ver)) {
|
||||
printf("%s %s\n", a.applicationName().toLocal8Bit().constData(), a.applicationVersion().toLocal8Bit().constData());
|
||||
return 0;
|
||||
}
|
||||
|
||||
verbose = parser.isSet(v);
|
||||
|
||||
MainWindow w;
|
||||
|
Loading…
Reference in New Issue
Block a user