From c0979fe9d637f49a9d81fa9a2278a6b812eecfed Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sat, 2 Apr 2016 23:32:16 +0200 Subject: [PATCH] Minor fixups to the change that added FreeType on OSX The opentype CONFIG does nothing, and the removed if condition has already been checked at that point. Change-Id: Ibf5365eb08f09451230319bc6af1014614876792 Reviewed-by: Konstantin Ritt --- src/platformsupport/fontdatabases/mac/coretext.pri | 1 - src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platformsupport/fontdatabases/mac/coretext.pri b/src/platformsupport/fontdatabases/mac/coretext.pri index ebb64d15b4..d9ffb85f96 100644 --- a/src/platformsupport/fontdatabases/mac/coretext.pri +++ b/src/platformsupport/fontdatabases/mac/coretext.pri @@ -5,7 +5,6 @@ contains(QT_CONFIG, freetype) { include($$QT_SOURCE_TREE/src/3rdparty/freetype_dependency.pri) HEADERS += $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h SOURCES += $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp - CONFIG += opentype } ios: \ diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index f5372151b7..df39dcf6be 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -638,7 +638,7 @@ static CFArrayRef createDescriptorArrayForFont(CTFontRef font, const QString &fi // QUrl::fromLocalFile() doesn't accept qrc pseudo-paths like ":/fonts/myfont.ttf". // Therefore construct from QString with the qrc:// scheme -> "qrc:///fonts/myfont.ttf". fontURL = QUrl(QStringLiteral("qrc://") + fileName.mid(1)).toCFURL(); - } else if (!fileName.isEmpty()) { + } else { // At this point we hope that filename is in a format that QUrl can handle. fontURL = QUrl::fromLocalFile(fileName).toCFURL(); }