parent
3ed0915b57
commit
d2bf5e63e4
2 changed files with 4 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
The search order for a setting file is:
|
The search order for a setting file is:
|
||||||
1. `<install-path>/settings/Deskflow.conf`
|
1. `<install-path>/settings/Deskflow.conf`
|
||||||
|
1. `<XDG_CONFIG_HOME>/Deskflow/Deskflow.conf`
|
||||||
1. A user settings file
|
1. A user settings file
|
||||||
1. A system settings file
|
1. A system settings file
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,9 @@ Settings::Settings(QObject *parent) : QObject(parent)
|
||||||
if (QFile(m_portableSettingsFile).exists()) {
|
if (QFile(m_portableSettingsFile).exists()) {
|
||||||
fileToLoad = m_portableSettingsFile;
|
fileToLoad = m_portableSettingsFile;
|
||||||
} else {
|
} else {
|
||||||
if (QFile(UserSettingFile).exists())
|
if (!qEnvironmentVariable("XDG_CONFIG_HOME").isEmpty())
|
||||||
|
fileToLoad = QStringLiteral("%1/%2/%2.conf").arg(qEnvironmentVariable("XDG_CONFIG_HOME"), kAppName);
|
||||||
|
else if (QFile(UserSettingFile).exists())
|
||||||
fileToLoad = UserSettingFile;
|
fileToLoad = UserSettingFile;
|
||||||
else if (QFile(SystemSettingFile).exists())
|
else if (QFile(SystemSettingFile).exists())
|
||||||
fileToLoad = SystemSettingFile;
|
fileToLoad = SystemSettingFile;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue