mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Initialize Application before parser arguments (#6177)
Co-authored-by: Jonathan White <support@dmapps.us>
This commit is contained in:
parent
c0d673b46f
commit
46f5596e59
13
src/main.cpp
13
src/main.cpp
@ -56,6 +56,12 @@ int main(int argc, char** argv)
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) && defined(Q_OS_WIN)
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
#endif
|
||||
Application app(argc, argv);
|
||||
// don't set organizationName as that changes the return value of
|
||||
// QStandardPaths::writableLocation(QDesktopServices::DataLocation)
|
||||
Application::setApplicationName("KeePassXC");
|
||||
Application::setApplicationVersion(KEEPASSXC_VERSION);
|
||||
app.setProperty("KPXC_QUALIFIED_APPNAME", "org.keepassxc.KeePassXC");
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QObject::tr("KeePassXC - cross-platform password manager"));
|
||||
@ -83,13 +89,6 @@ int main(int argc, char** argv)
|
||||
parser.addOption(allowScreenCaptureOption);
|
||||
}
|
||||
|
||||
Application app(argc, argv);
|
||||
// don't set organizationName as that changes the return value of
|
||||
// QStandardPaths::writableLocation(QDesktopServices::DataLocation)
|
||||
Application::setApplicationName("KeePassXC");
|
||||
Application::setApplicationVersion(KEEPASSXC_VERSION);
|
||||
app.setProperty("KPXC_QUALIFIED_APPNAME", "org.keepassxc.KeePassXC");
|
||||
|
||||
parser.process(app);
|
||||
|
||||
// Exit early if we're only showing the help / version
|
||||
|
Loading…
Reference in New Issue
Block a user