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 <ritt.ks@gmail.com>
bb10
Andreas Hartmetz 2016-04-02 23:32:16 +02:00 committed by Konstantin Ritt
parent ccdc3eac80
commit c0979fe9d6
2 changed files with 1 additions and 2 deletions

View File

@ -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: \

View File

@ -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();
}