summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-10-24 10:17:35 +0200
committerLars Knoll <lars.knoll@qt.io>2016-10-26 13:07:43 +0000
commit99331f661d6ef88f9bb964133ee4eaf8b6d74e80 (patch)
tree39bf73973614f07215a515dfa1d33b4724c88604
parent04f0a69e96fca03c18e0c7eaaab7babc49e35198 (diff)
Fix QStandardPaths::FontsLocation to be compliant with the latest XDG spec
According to the latest XDG spec, FontsLocation should point to XDG_DATA_DIR/fonts, not ~/.fonts. Task-number: QTBUG-55507 Change-Id: Ia62ffe172abbb93d5ce7fd58bdf038ff13954f1b Reviewed-by: David Faure <david.faure@kdab.com>
-rw-r--r--src/corelib/io/qstandardpaths_unix.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp
index 0561e5833f..7974dc8cca 100644
--- a/src/corelib/io/qstandardpaths_unix.cpp
+++ b/src/corelib/io/qstandardpaths_unix.cpp
@@ -245,7 +245,7 @@ QString QStandardPaths::writableLocation(StandardLocation type)
break;
case FontsLocation:
- path = QDir::homePath() + QLatin1String("/.fonts");
+ path = writableLocation(GenericDataLocation) + QLatin1String("/fonts");
break;
case MusicLocation:
@@ -340,6 +340,9 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
for (int i = 0; i < dirs.count(); ++i)
appendOrganizationAndApp(dirs[i]);
break;
+ case FontsLocation:
+ dirs += QDir::homePath() + QLatin1String("/.fonts");
+ break;
default:
break;
}