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;
|
break;
|
||||||
|
|
||||||
case FontsLocation:
|
case FontsLocation:
|
||||||
path = QDir::homePath() + QLatin1String("/.fonts");
|
path = writableLocation(GenericDataLocation) + QLatin1String("/fonts");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MusicLocation:
|
case MusicLocation:
|
||||||
@ -340,6 +340,9 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
|
|||||||
for (int i = 0; i < dirs.count(); ++i)
|
for (int i = 0; i < dirs.count(); ++i)
|
||||||
appendOrganizationAndApp(dirs[i]);
|
appendOrganizationAndApp(dirs[i]);
|
||||||
break;
|
break;
|
||||||
|
case FontsLocation:
|
||||||
|
dirs += QDir::homePath() + QLatin1String("/.fonts");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user