Isolate freetype feature

If freetype feature is not enabled we don't deliver its header
files as part of Qt. The freetype font database was used
as the generic fontdata base for unix platforms. This uses
QPlatformFontDatabase as the generic one if neither fontconfig
nor freetype features are enabled.

Fixes: QTBUG-109270
Change-Id: I9e935fd1557db417eb94d44b6a0d88818d567fbe
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Alexey Edelev 2022-12-08 11:29:17 +01:00
parent b9c80ecc08
commit a02750d12f
3 changed files with 8 additions and 5 deletions

View File

@ -748,7 +748,7 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_freetype
WrapFreetype::WrapFreetype
)
qt_internal_extend_target(Gui CONDITION QT_FEATURE_freetype AND UNIX AND NOT APPLE
qt_internal_extend_target(Gui CONDITION UNIX AND NOT APPLE
SOURCES
text/unix/qgenericunixfontdatabase_p.h
)

View File

@ -20,9 +20,12 @@
#if QT_CONFIG(fontconfig)
#include <QtGui/private/qfontconfigdatabase_p.h>
using QGenericUnixFontDatabase = QFontconfigDatabase;
#else
#elif QT_CONFIG(freetype)
#include <QtGui/private/qfreetypefontdatabase_p.h>
using QGenericUnixFontDatabase = QFreeTypeFontDatabase;
#endif //Q_FONTCONFIGDATABASE
#else
#include <qpa/qplatformfontdatabase.h>
using QGenericUnixFontDatabase = QPlatformFontDatabase;
#endif
#endif // QGENERICUNIXFONTDATABASE_H

View File

@ -6,11 +6,11 @@
#include <QtGui/private/qpixmap_raster_p.h>
#include <QtGui/private/qguiapplication_p.h>
#include <qpa/qplatformfontdatabase.h>
#include <qpa/qplatformnativeinterface.h>
#include <qpa/qplatformwindow.h>
#include <qpa/qwindowsysteminterface.h>
#include <QtGui/private/qfreetypefontdatabase_p.h>
#if defined(Q_OS_WIN)
# include <QtGui/private/qwindowsfontdatabase_p.h>
# if QT_CONFIG(freetype)
@ -22,11 +22,11 @@
#if QT_CONFIG(fontconfig)
# include <QtGui/private/qgenericunixfontdatabase_p.h>
# include <qpa/qplatformfontdatabase.h>
#endif
#if QT_CONFIG(freetype)
#include <QtGui/private/qfontengine_ft_p.h>
#include <QtGui/private/qfreetypefontdatabase_p.h>
#endif
#if !defined(Q_OS_WIN)