summaryrefslogtreecommitdiffstats
path: root/tdeui
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-03-27 02:07:14 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-03-27 02:08:28 +0100
commit513dce7c027b6e60627d4ff6d97bc4e9fffcb060 (patch)
tree1f21687feaa10b01aa23312a16662d4b4b606f4a /tdeui
parent7d6a98f9b3e39a3966ae3d2fdccb00277b4896d1 (diff)
downloadtdelibs-513dce7c027b6e60627d4ff6d97bc4e9fffcb060.tar.gz
tdelibs-513dce7c027b6e60627d4ff6d97bc4e9fffcb060.zip
Fix crashes with fontconfig 2.9.0 and newer
This resolves Bug 1422
Diffstat (limited to 'tdeui')
-rw-r--r--tdeui/tdeactionclasses.cpp3
-rw-r--r--tdeui/tdefontcombo.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/tdeui/tdeactionclasses.cpp b/tdeui/tdeactionclasses.cpp
index 4b589f166..80f646869 100644
--- a/tdeui/tdeactionclasses.cpp
+++ b/tdeui/tdeactionclasses.cpp
@@ -1506,12 +1506,13 @@ void TDEFontAction::setFont( const TQString &family )
// check again to solve an alias
FcPattern *pattern = NULL;
FcConfig *config = NULL;
+ FcResult result;
TQString realFamily;
TQRegExp regExp("[-:]");
pattern = FcNameParse( (unsigned char*) family.ascii() );
FcDefaultSubstitute(pattern);
FcConfigSubstitute (config, pattern, FcMatchPattern);
- pattern = FcFontMatch(NULL, pattern, NULL);
+ pattern = FcFontMatch(NULL, pattern, &result);
realFamily = (char*)FcNameUnparse(pattern);
realFamily.remove(realFamily.find(regExp), realFamily.length());
diff --git a/tdeui/tdefontcombo.cpp b/tdeui/tdefontcombo.cpp
index cb250385f..cc3b090b7 100644
--- a/tdeui/tdefontcombo.cpp
+++ b/tdeui/tdefontcombo.cpp
@@ -244,12 +244,13 @@ void TDEFontCombo::setCurrentFont(const TQString &family)
// check again to solve an alias
FcPattern *pattern = NULL;
FcConfig *config = NULL;
+ FcResult result;
TQString realFamily;
TQRegExp regExp("[-:]");
pattern = FcNameParse( (unsigned char*) family.ascii() );
FcDefaultSubstitute(pattern);
FcConfigSubstitute (config, pattern, FcMatchPattern);
- pattern = FcFontMatch(NULL, pattern, NULL);
+ pattern = FcFontMatch(NULL, pattern, &result);
realFamily = (char*)FcNameUnparse(pattern);
realFamily.remove(realFamily.find(regExp), realFamily.length());