kdebase4-workspace/kdebase-workspace-4.9.0-fontconfigdir.patch

26 lines
792 B
Diff
Raw Normal View History

--- kde-workspace-4.9.0/kcontrol/fonts/kxftconfig.cpp.fontconfigdir 2012-05-23 07:51:10.000000000 +0800
+++ kde-workspace-4.9.0/kcontrol/fonts/kxftconfig.cpp 2012-08-01 20:34:29.000000000 +0800
@@ -31,6 +31,8 @@
#include <QByteArray>
#include <klocale.h>
#include <kde_file.h>
+#include <KDE/KGlobal>
+#include <KDE/KStandardDirs>
#include <QDir>
#include <stdarg.h>
@@ -143,7 +145,12 @@
return files.front(); // Just return the 1st one...
}
else // Hmmm... no known files?
- return home+"/.fonts.conf";
+ {
+ if(FcGetVersion() >= 21000)
+ return KGlobal::dirs()->localxdgconfdir()+"fontconfig/fonts.conf";
+ else
+ return home+"/.fonts.conf";
+ }
}
static QString getEntry(QDomElement element, const char *type, unsigned int numAttributes, ...)