summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMÃ¥rten Nordheim <marten.nordheim@qt.io>2022-10-24 12:43:56 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-10-26 12:48:51 +0000
commit571344c2c7c5ad68f1f006326893afe89e8569fa (patch)
tree24bcf75e17bd0e767e218338eac48fc97c048929
parenta9771f2b8cf2d16ee242b1c1a0780e51c42818e5 (diff)
QWindowsFontDatabaseBase: Override both fontEngine functions
MinGW-clang gives warning(-as-error) because the overridden function which is there shadows the other overload, making it inaccessible. Change-Id: Ie5684b60a13d71966b9741fcfcdacbd37fe0df85 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 6c832731304414932fafa10c300707192e11e751) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/gui/text/windows/qwindowsfontdatabasebase.cpp7
-rw-r--r--src/gui/text/windows/qwindowsfontdatabasebase_p.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/windows/qwindowsfontdatabasebase.cpp b/src/gui/text/windows/qwindowsfontdatabasebase.cpp
index a6df42da95..d05410cf5f 100644
--- a/src/gui/text/windows/qwindowsfontdatabasebase.cpp
+++ b/src/gui/text/windows/qwindowsfontdatabasebase.cpp
@@ -751,6 +751,13 @@ IDWriteFontFace *QWindowsFontDatabaseBase::createDirectWriteFace(const QByteArra
}
#endif // directwrite && direct2d
+QFontEngine *QWindowsFontDatabaseBase::fontEngine(const QFontDef &fontDef, void *handle)
+{
+ // This function was apparently not used before, and probably isn't now either,
+ // call the base implementation which just prints that it's not supported.
+ return QPlatformFontDatabase::fontEngine(fontDef, handle);
+}
+
QFontEngine *QWindowsFontDatabaseBase::fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference)
{
QFontEngine *fontEngine = nullptr;
diff --git a/src/gui/text/windows/qwindowsfontdatabasebase_p.h b/src/gui/text/windows/qwindowsfontdatabasebase_p.h
index d192c62d7f..1451eed051 100644
--- a/src/gui/text/windows/qwindowsfontdatabasebase_p.h
+++ b/src/gui/text/windows/qwindowsfontdatabasebase_p.h
@@ -53,6 +53,7 @@ public:
QWindowsFontDatabaseBase();
~QWindowsFontDatabaseBase() override;
+ QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override;
QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) override;
static int defaultVerticalDPI();