Cleanup QT_NO_FONTCONFIG usage

Stop messing around with the define in pro files, and rely on
the configuration system. Disable fontconfig on Mac, which in practice
gives the same result as before.

Change-Id: Iea3aec127af96f221f4ee8682fb20a624332b82f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Lars Knoll 2016-08-10 14:50:28 +02:00
parent e33a382c33
commit fd89fb4566
6 changed files with 6 additions and 10 deletions

View File

@ -2063,7 +2063,7 @@
},
"fontconfig": {
"description": "Fontconfig",
"condition": "!config.win32 && features.system-freetype && libs.fontconfig",
"condition": "!config.win32 && !config.darwin && features.system-freetype && libs.fontconfig",
"output": [ "privateFeature", "feature" ]
},
"harfbuzz": {

View File

@ -1,5 +1,3 @@
DEFINES += QT_NO_FONTCONFIG
HEADERS += \
$$PWD/qbasicfontdatabase_p.h \
$$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h

View File

@ -2,5 +2,5 @@ HEADERS += $$PWD/qfontconfigdatabase_p.h \
$$PWD/qfontenginemultifontconfig_p.h
SOURCES += $$PWD/qfontconfigdatabase.cpp \
$$PWD/qfontenginemultifontconfig.cpp
DEFINES -= QT_NO_FONTCONFIG
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_FONTCONFIG

View File

@ -11,7 +11,6 @@ HEADERS = qminimalintegration.h \
OTHER_FILES += minimal.json
CONFIG += qpa/genericunixfontdatabase
win32|darwin: DEFINES += QT_NO_FONTCONFIG
PLUGIN_TYPE = platforms
PLUGIN_CLASS_NAME = QMinimalIntegrationPlugin

View File

@ -46,10 +46,10 @@
#if defined(Q_OS_WIN)
#include <QtPlatformSupport/private/qbasicfontdatabase_p.h>
#elif defined(QT_NO_FONTCONFIG)
#include <qpa/qplatformfontdatabase.h>
#else
#elif QT_CONFIG(fontconfig)
#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>
#else
#include <qpa/qplatformfontdatabase.h>
#endif
#if !defined(Q_OS_WIN)
@ -118,7 +118,7 @@ public:
QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const
{
if (m_options & EnableFonts) {
#ifndef QT_NO_FONTCONFIG
#if QT_CONFIG(fontconfig)
if (!m_fontDatabase)
m_fontDatabase = new QGenericUnixFontDatabase;
#else

View File

@ -117,7 +117,6 @@ qtConfig(freetype) {
qtConfig(system-freetype) {
include($$QT_SOURCE_TREE/src/platformsupport/fontdatabases/basic/basic.pri)
} else {
DEFINES *= QT_NO_FONTCONFIG
include($$QT_SOURCE_TREE/src/3rdparty/freetype_dependency.pri)
}
}