mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 10:52:56 +00:00
handle XDG_CONFIG_DIRS as list of paths in QStandardPaths::standardLocations()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d0bc84533a
commit
c384b2c1c8
1 changed files with 9 additions and 9 deletions
|
@ -192,9 +192,9 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
|
|||
}
|
||||
|
||||
case StandardLocation::DataLocation: {
|
||||
const QString xdghome(getEnvName("XDG_DATA_HOME"));
|
||||
if (!xdghome.isEmpty()) {
|
||||
result.append(xdghome);
|
||||
const QString location(getEnvName("XDG_DATA_HOME"));
|
||||
if (!location.isEmpty()) {
|
||||
result.append(location);
|
||||
} else {
|
||||
result.append(QDir::homePath() + QLatin1String("/.local/share"));
|
||||
}
|
||||
|
@ -217,16 +217,16 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
|
|||
break;
|
||||
}
|
||||
case StandardLocation::ConfigLocation: {
|
||||
const QString xdghome(getEnvName("XDG_CONFIG_HOME"));
|
||||
if (!xdghome.isEmpty()) {
|
||||
result.append(xdghome);
|
||||
const QString location(getEnvName("XDG_CONFIG_HOME"));
|
||||
if (!location.isEmpty()) {
|
||||
result.append(location);
|
||||
} else {
|
||||
result.append(QDir::homePath() + QLatin1String("/.config"));
|
||||
}
|
||||
|
||||
const QString location(getEnvName("XDG_CONFIG_DIRS"));
|
||||
if (!location.isEmpty()) {
|
||||
result.append(location);
|
||||
const QStringList locations(getEnvListName("XDG_CONFIG_DIRS"));
|
||||
if (!locations.isEmpty()) {
|
||||
result.append(locations);
|
||||
} else {
|
||||
result.append(QDir::homePath() + QLatin1String("/etc/xdg"));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue