summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-08-08 16:14:56 +0200
committerMorten Johan Sørvig <morten.sorvig@digia.com>2014-08-28 15:17:53 +0200
commit3da75b05841e503c146a326c15b9065eebfe35b7 (patch)
tree1c5ec4643bc169ebe08bda5cc4bd535b4bf819ae
parent5a278dd42a9fa6a27dca3a6ec1f8ada3c433a780 (diff)
QCoreTextFontDatabase: Remove number type asserts.
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ø <tor.arne.vestbo@digia.com>
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index cff90f420b..ca7afb7d1b 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)