Use QStandardPaths::DataLocation instead of AppDataLocation.

AppDataLocation is only available in Qt >= 5.4.
This commit is contained in:
Felix Geyer 2015-09-12 18:41:48 +02:00
parent 2e23fb203a
commit 3dd98deecc
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ Config::Config(QObject* parent)
userPath += "/keepassx/";
#else
userPath = QDir::fromNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
userPath = QDir::fromNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
// storageLocation() appends the application name ("/keepassx") to the end
userPath += "/";
#endif

View File

@ -37,7 +37,7 @@ int main(int argc, char** argv)
Application::setApplicationName("keepassx");
Application::setApplicationVersion(KEEPASSX_VERSION);
// don't set organizationName as that changes the return value of
// QStandardPaths::writableLocation(QDesktopServices::AppDataLocation)
// QStandardPaths::writableLocation(QDesktopServices::DataLocation)
QApplication::setQuitOnLastWindowClosed(false);