mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
Add the -v / --version option, which displays the version string of the application.
This commit is contained in:
parent
243cd14b2e
commit
4059f17e15
1 changed files with 6 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDesktopWidget>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
|
@ -135,12 +136,16 @@ main(int argc, char *argv[])
|
|||
return a.exec();
|
||||
}
|
||||
|
||||
QApplication app(argc, argv);
|
||||
QCoreApplication::setApplicationName("nheko");
|
||||
QCoreApplication::setApplicationVersion(nheko::version);
|
||||
QCoreApplication::setOrganizationName("nheko");
|
||||
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
QApplication app(argc, argv);
|
||||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.process(app);
|
||||
|
||||
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-Regular.ttf");
|
||||
QFontDatabase::addApplicationFont(":/fonts/fonts/OpenSans/OpenSans-Italic.ttf");
|
||||
|
|
Loading…
Reference in a new issue