Include XDG font locations in QStandardPaths::FontsLocation on Linux

~/.fonts was deprecated in 2012, see
https://wiki.archlinux.org/index.php/Font_configuration#Fontconfig_configuration

Few people keep fonts there anymore.

Change-Id: Ide048e1df2c2db4856a38c574df36663ab684f89
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Alex Henrie 2019-08-13 17:25:27 -06:00
parent 53ac8094b1
commit ca81c884f8
2 changed files with 4 additions and 1 deletions

View File

@ -232,7 +232,7 @@ QT_BEGIN_NAMESPACE
\row \li DocumentsLocation
\li "~/Documents"
\row \li FontsLocation
\li "~/.fonts"
\li "~/.fonts", "~/.local/share/fonts", "/usr/local/share/fonts", "/usr/share/fonts"
\row \li ApplicationsLocation
\li "~/.local/share/applications", "/usr/local/share/applications", "/usr/share/applications"
\row \li MusicLocation

View File

@ -348,6 +348,9 @@ QStringList QStandardPaths::standardLocations(StandardLocation type)
break;
case FontsLocation:
dirs += QDir::homePath() + QLatin1String("/.fonts");
dirs += xdgDataDirs();
for (int i = 1; i < dirs.count(); ++i)
dirs[i].append(QLatin1String("/fonts"));
break;
default:
break;