From 99331f661d6ef88f9bb964133ee4eaf8b6d74e80 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 24 Oct 2016 10:17:35 +0200 Subject: 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 --- src/corelib/io/qstandardpaths_unix.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3