QCoreTextFontDatabase: Get rid of local fallbacksForFamily cache
The centralized one (in QFontDatabase) does the job. Change-Id: I33def7a7bcddeaa62b904d8812321a7f4648a9d0 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This commit is contained in:
parent
229c519785
commit
248488c894
@ -518,9 +518,6 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
|
||||
if (&CTFontCopyDefaultCascadeListForLanguages)
|
||||
#endif
|
||||
{
|
||||
if (fallbackLists.contains(family))
|
||||
return fallbackLists.value(family);
|
||||
|
||||
QCFType<CFMutableDictionaryRef> attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
|
||||
CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, QCFString(family));
|
||||
if (QCFType<CTFontDescriptorRef> fontDescriptor = CTFontDescriptorCreateWithAttributes(attributes)) {
|
||||
@ -548,12 +545,9 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
|
||||
fallbackList.append(QStringLiteral("Arial Unicode MS"));
|
||||
#endif
|
||||
|
||||
fallbackLists[family] = fallbackList;
|
||||
return fallbackList;
|
||||
}
|
||||
}
|
||||
|
||||
if (fallbackLists.contains(family))
|
||||
return fallbackLists.value(family);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user