diff --git a/configure.json b/configure.json index 3f007d485d..f3c6f247f9 100644 --- a/configure.json +++ b/configure.json @@ -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": { diff --git a/src/platformsupport/fontdatabases/basic/basic.pri b/src/platformsupport/fontdatabases/basic/basic.pri index 52cf771b2a..575c93fe20 100644 --- a/src/platformsupport/fontdatabases/basic/basic.pri +++ b/src/platformsupport/fontdatabases/basic/basic.pri @@ -1,5 +1,3 @@ -DEFINES += QT_NO_FONTCONFIG - HEADERS += \ $$PWD/qbasicfontdatabase_p.h \ $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h diff --git a/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri index bd7294b818..63097c33c1 100644 --- a/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri +++ b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri @@ -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 diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index 3aca27b555..0d31d6605b 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -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 diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp index 7224f4114c..984d4456a0 100644 --- a/src/plugins/platforms/minimal/qminimalintegration.cpp +++ b/src/plugins/platforms/minimal/qminimalintegration.cpp @@ -46,10 +46,10 @@ #if defined(Q_OS_WIN) #include -#elif defined(QT_NO_FONTCONFIG) -#include -#else +#elif QT_CONFIG(fontconfig) #include +#else +#include #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 diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri index 28d7d04db4..6929f7365f 100644 --- a/src/plugins/platforms/windows/windows.pri +++ b/src/plugins/platforms/windows/windows.pri @@ -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) } }