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:
parent
04f0a69e96
commit
99331f661d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user