mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-26 20:06:41 -08:00
Merge remote-tracking branch 'keepassx/master'
# Conflicts: # README.md # share/translations/keepassx_de.ts # src/CMakeLists.txt # src/gui/MainWindow.h
This commit is contained in:
commit
aba4fa94be
244 files changed
+17682
-6917
No files matched your search
+4
-4
@@ -18,12 +18,12 @@
|
||||
#include "Config.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDesktopServices>
|
||||
#include <QDir>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QTemporaryFile>
|
||||
|
||||
Config* Config::m_instance(Q_NULLPTR);
|
||||
Config* Config::m_instance(nullptr);
|
||||
|
||||
QVariant Config::get(const QString& key)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ Config::Config(QObject* parent)
|
||||
QString homePath = QDir::homePath();
|
||||
|
||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||
// we can't use QDesktopServices on X11 as it uses XDG_DATA_HOME instead of XDG_CONFIG_HOME
|
||||
// we can't use QStandardPaths on X11 as it uses XDG_DATA_HOME instead of XDG_CONFIG_HOME
|
||||
QByteArray env = qgetenv("XDG_CONFIG_HOME");
|
||||
if (env.isEmpty()) {
|
||||
userPath = homePath;
|
||||
@@ -70,7 +70,7 @@ Config::Config(QObject* parent)
|
||||
|
||||
userPath += "/keepassx/";
|
||||
#else
|
||||
userPath = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
|
||||
userPath = QDir::fromNativeSeparators(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
|
||||
// storageLocation() appends the application name ("/keepassx") to the end
|
||||
userPath += "/";
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user