Clean up the CFTypes used in popuplateFamily

Change-Id: Iabe127486c77ebb2afe7fe13ecccd70252a79031
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
Andy Shaw 2014-09-26 18:54:51 +02:00
parent a7f1eb4ab3
commit 9884ec73dd

View File

@ -223,9 +223,9 @@ void QCoreTextFontDatabase::populateFontDatabase()
void QCoreTextFontDatabase::populateFamily(const QString &familyName)
{
CFMutableDictionaryRef attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
QCFType<CFMutableDictionaryRef> attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, QCFString(familyName));
CTFontDescriptorRef nameOnlyDescriptor = CTFontDescriptorCreateWithAttributes(attributes);
QCFType<CTFontDescriptorRef> nameOnlyDescriptor = CTFontDescriptorCreateWithAttributes(attributes);
// A single family might match several different fonts with different styles eg.
QCFType<CFArrayRef> matchingFonts = (CFArrayRef) CTFontDescriptorCreateMatchingFontDescriptors(nameOnlyDescriptor, 0);