mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Set the application name and version in QApplication.
This commit is contained in:
parent
c2781274a0
commit
678c4a8ece
@ -71,7 +71,7 @@ Config::Config(QObject* parent)
|
||||
userPath += "/keepassx/";
|
||||
#else
|
||||
userPath = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
|
||||
userPath += "/keepassx/";
|
||||
// storageLocation() appends the application name ("/keepassx/") to the end
|
||||
#endif
|
||||
|
||||
userPath += "keepassx2.ini";
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include "config-keepassx.h"
|
||||
#include "core/Config.h"
|
||||
#include "core/qcommandlineparser.h"
|
||||
#include "core/Tools.h"
|
||||
@ -31,8 +32,10 @@ int main(int argc, char** argv)
|
||||
#endif
|
||||
|
||||
Application app(argc, argv);
|
||||
// don't set applicationName or organizationName as that changes
|
||||
// QDesktopServices::storageLocation()
|
||||
Application::setApplicationName("keepassx");
|
||||
Application::setApplicationVersion(KEEPASSX_VERSION);
|
||||
// don't set organizationName as that changes the return value of
|
||||
// QDesktopServices::storageLocation(QDesktopServices::DataLocation)
|
||||
|
||||
Crypto::init();
|
||||
|
||||
@ -51,6 +54,7 @@ int main(int argc, char** argv)
|
||||
"keyfile");
|
||||
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.addOption(configOption);
|
||||
parser.addOption(passwordOption);
|
||||
parser.addOption(keyfileOption);
|
||||
|
Loading…
Reference in New Issue
Block a user