From 7a413fa40c85625562528fa4330a58eb9fe4cc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 8 Aug 2014 16:14:56 +0200 Subject: QCoreTextFontDatabase: Remove number type asserts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On iOS 8, the value 0 is returned as a kCFNumberIntType. The code still works - CFNumberGetValue converts it to a 0.0 double. Change-Id: Ic50900b22e4fa19ad1481e8e0e293559bbfd8cd2 Reviewed-by: Tor Arne Vestbø --- src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index 4da209e769..8e4c1c07a8 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -264,7 +264,6 @@ static void getFontDescription(CTFontDescriptorRef font, FontDescription *fd) if (styles) { if (CFNumberRef weightValue = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontWeightTrait)) { - Q_ASSERT(CFNumberIsFloatType(weightValue)); double normalizedWeight; if (CFNumberGetValue(weightValue, kCFNumberDoubleType, &normalizedWeight)) { if (normalizedWeight >= 0.62) @@ -280,7 +279,6 @@ static void getFontDescription(CTFontDescriptorRef font, FontDescription *fd) } } if (CFNumberRef italic = (CFNumberRef) CFDictionaryGetValue(styles, kCTFontSlantTrait)) { - Q_ASSERT(CFNumberIsFloatType(italic)); double d; if (CFNumberGetValue(italic, kCFNumberDoubleType, &d)) { if (d > 0.0) -- cgit v1.2.3