mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-30 00:03:33 -05: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/";
|
userPath += "/keepassx/";
|
||||||
#else
|
#else
|
||||||
userPath = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
|
userPath = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
|
||||||
userPath += "/keepassx/";
|
// storageLocation() appends the application name ("/keepassx/") to the end
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
userPath += "keepassx2.ini";
|
userPath += "keepassx2.ini";
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
|
#include "config-keepassx.h"
|
||||||
#include "core/Config.h"
|
#include "core/Config.h"
|
||||||
#include "core/qcommandlineparser.h"
|
#include "core/qcommandlineparser.h"
|
||||||
#include "core/Tools.h"
|
#include "core/Tools.h"
|
||||||
@ -31,8 +32,10 @@ int main(int argc, char** argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
Application app(argc, argv);
|
Application app(argc, argv);
|
||||||
// don't set applicationName or organizationName as that changes
|
Application::setApplicationName("keepassx");
|
||||||
// QDesktopServices::storageLocation()
|
Application::setApplicationVersion(KEEPASSX_VERSION);
|
||||||
|
// don't set organizationName as that changes the return value of
|
||||||
|
// QDesktopServices::storageLocation(QDesktopServices::DataLocation)
|
||||||
|
|
||||||
Crypto::init();
|
Crypto::init();
|
||||||
|
|
||||||
@ -51,6 +54,7 @@ int main(int argc, char** argv)
|
|||||||
"keyfile");
|
"keyfile");
|
||||||
|
|
||||||
parser.addHelpOption();
|
parser.addHelpOption();
|
||||||
|
parser.addVersionOption();
|
||||||
parser.addOption(configOption);
|
parser.addOption(configOption);
|
||||||
parser.addOption(passwordOption);
|
parser.addOption(passwordOption);
|
||||||
parser.addOption(keyfileOption);
|
parser.addOption(keyfileOption);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user