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>
This commit is contained in:
Lars Knoll 2016-10-24 10:17:35 +02:00
parent 04f0a69e96
commit 99331f661d

View File

@ -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;
}