diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2024-01-17 15:53:40 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2024-01-18 08:04:08 +0100 |
commit | 0d1ac449bbc38aee4341dd47189de901860d7870 (patch) | |
tree | 75e4e6842386ccf6d003a9cc22e726b33babb69e /src/gui/text/windows/qwindowsfontdatabasebase.cpp | |
parent | c09219e946ed3d90349c3638afe304553bf38011 (diff) |
Fix build with -no-directwrite
QWindowsFontDatabaseBase::invalidate() was defined inside an
the declaration was not.
Since the font file loader is only protected by
QT_CONFIG(directwrite), we move it out from the previous block
and add an #if for the contents instead.
Pick-to: 6.7
Change-Id: Iedc02cceb15fe3d25d21b49af1486659a4d6373b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/text/windows/qwindowsfontdatabasebase.cpp')
-rw-r--r-- | src/gui/text/windows/qwindowsfontdatabasebase.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/text/windows/qwindowsfontdatabasebase.cpp b/src/gui/text/windows/qwindowsfontdatabasebase.cpp index a1c400ee9b..cef739201b 100644 --- a/src/gui/text/windows/qwindowsfontdatabasebase.cpp +++ b/src/gui/text/windows/qwindowsfontdatabasebase.cpp @@ -710,6 +710,13 @@ QFont QWindowsFontDatabaseBase::systemDefaultFont() return systemFont; } +void QWindowsFontDatabaseBase::invalidate() +{ +#if QT_CONFIG(directwrite) + m_fontFileLoader.reset(nullptr); +#endif +} + #if QT_CONFIG(directwrite) && QT_CONFIG(direct2d) IDWriteFontFace *QWindowsFontDatabaseBase::createDirectWriteFace(const QByteArray &fontData) { @@ -719,11 +726,6 @@ IDWriteFontFace *QWindowsFontDatabaseBase::createDirectWriteFace(const QByteArra return faces.isEmpty() ? nullptr : faces.first(); } -void QWindowsFontDatabaseBase::invalidate() -{ - m_fontFileLoader.reset(nullptr); -} - QList<IDWriteFontFace *> QWindowsFontDatabaseBase::createDirectWriteFaces(const QByteArray &fontData, bool queryVariations) const { |