diff options
5 files changed, 24 insertions, 34 deletions
diff --git a/src/gui/text/windows/qwindowsdirectwritefontdatabase.cpp b/src/gui/text/windows/qwindowsdirectwritefontdatabase.cpp index 7a4ce0930a..1779872f7d 100644 --- a/src/gui/text/windows/qwindowsdirectwritefontdatabase.cpp +++ b/src/gui/text/windows/qwindowsdirectwritefontdatabase.cpp @@ -103,16 +103,6 @@ static QFont::Weight fromDirectWriteWeight(DWRITE_FONT_WEIGHT weight) return static_cast<QFont::Weight>(weight); } -static DWRITE_FONT_STYLE toDirectWriteStyle(QFont::Style style) -{ - switch (style) { - case QFont::StyleNormal: return DWRITE_FONT_STYLE_NORMAL; - case QFont::StyleOblique: return DWRITE_FONT_STYLE_OBLIQUE; - case QFont::StyleItalic: return DWRITE_FONT_STYLE_ITALIC; - default: return DWRITE_FONT_STYLE_NORMAL; - } -} - static QFont::Style fromDirectWriteStyle(DWRITE_FONT_STYLE style) { switch (style) { diff --git a/src/gui/text/windows/qwindowsfontdatabasebase.cpp b/src/gui/text/windows/qwindowsfontdatabasebase.cpp index 279f696bbd..81042c1284 100644 --- a/src/gui/text/windows/qwindowsfontdatabasebase.cpp +++ b/src/gui/text/windows/qwindowsfontdatabasebase.cpp @@ -317,15 +317,15 @@ namespace { { } - HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object); - ULONG STDMETHODCALLTYPE AddRef(); - ULONG STDMETHODCALLTYPE Release(); + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) override; + ULONG STDMETHODCALLTYPE AddRef() override; + ULONG STDMETHODCALLTYPE Release() override; HRESULT STDMETHODCALLTYPE ReadFileFragment(const void **fragmentStart, UINT64 fileOffset, - UINT64 fragmentSize, OUT void **fragmentContext); - void STDMETHODCALLTYPE ReleaseFileFragment(void *fragmentContext); - HRESULT STDMETHODCALLTYPE GetFileSize(OUT UINT64 *fileSize); - HRESULT STDMETHODCALLTYPE GetLastWriteTime(OUT UINT64 *lastWriteTime); + UINT64 fragmentSize, OUT void **fragmentContext) override; + void STDMETHODCALLTYPE ReleaseFileFragment(void *fragmentContext) override; + HRESULT STDMETHODCALLTYPE GetFileSize(OUT UINT64 *fileSize) override; + HRESULT STDMETHODCALLTYPE GetLastWriteTime(OUT UINT64 *lastWriteTime) override; private: QByteArray m_fontData; @@ -408,13 +408,13 @@ namespace { m_fontDatas.remove(key); } - HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object); - ULONG STDMETHODCALLTYPE AddRef(); - ULONG STDMETHODCALLTYPE Release(); + HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) override; + ULONG STDMETHODCALLTYPE AddRef() override; + ULONG STDMETHODCALLTYPE Release() override; HRESULT STDMETHODCALLTYPE CreateStreamFromKey(void const *fontFileReferenceKey, UINT32 fontFileReferenceKeySize, - OUT IDWriteFontFileStream **fontFileStream); + OUT IDWriteFontFileStream **fontFileStream) override; private: ULONG m_referenceCount; diff --git a/src/gui/text/windows/qwindowsfontenginedirectwrite.cpp b/src/gui/text/windows/qwindowsfontenginedirectwrite.cpp index 20063a0610..071273408e 100644 --- a/src/gui/text/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/gui/text/windows/qwindowsfontenginedirectwrite.cpp @@ -77,17 +77,17 @@ namespace { } virtual ~GeometrySink() = default; - IFACEMETHOD_(void, AddBeziers)(const D2D1_BEZIER_SEGMENT *beziers, UINT bezierCount); - IFACEMETHOD_(void, AddLines)(const D2D1_POINT_2F *points, UINT pointCount); - IFACEMETHOD_(void, BeginFigure)(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin); - IFACEMETHOD(Close)(); - IFACEMETHOD_(void, EndFigure)(D2D1_FIGURE_END figureEnd); - IFACEMETHOD_(void, SetFillMode)(D2D1_FILL_MODE fillMode); - IFACEMETHOD_(void, SetSegmentFlags)(D2D1_PATH_SEGMENT vertexFlags); - - IFACEMETHOD_(unsigned long, AddRef)(); - IFACEMETHOD_(unsigned long, Release)(); - IFACEMETHOD(QueryInterface)(IID const &riid, void **ppvObject); + IFACEMETHOD_(void, AddBeziers)(const D2D1_BEZIER_SEGMENT *beziers, UINT bezierCount) override; + IFACEMETHOD_(void, AddLines)(const D2D1_POINT_2F *points, UINT pointCount) override; + IFACEMETHOD_(void, BeginFigure)(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) override; + IFACEMETHOD(Close)() override; + IFACEMETHOD_(void, EndFigure)(D2D1_FIGURE_END figureEnd) override; + IFACEMETHOD_(void, SetFillMode)(D2D1_FILL_MODE fillMode) override; + IFACEMETHOD_(void, SetSegmentFlags)(D2D1_PATH_SEGMENT vertexFlags) override; + + IFACEMETHOD_(unsigned long, AddRef)() override; + IFACEMETHOD_(unsigned long, Release)() override; + IFACEMETHOD(QueryInterface)(IID const &riid, void **ppvObject) override; private: inline static QPointF fromD2D1_POINT_2F(const D2D1_POINT_2F &inp) diff --git a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp index b2fb4ba551..f8a28c395d 100644 --- a/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp +++ b/src/plugins/platforms/direct2d/qwindowsdirect2dplatformplugin.cpp @@ -49,7 +49,7 @@ class QWindowsDirect2DIntegrationPlugin : public QPlatformIntegrationPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "direct2d.json") public: - QPlatformIntegration *create(const QString&, const QStringList&); + QPlatformIntegration *create(const QString&, const QStringList&) override; }; QPlatformIntegration *QWindowsDirect2DIntegrationPlugin::create(const QString& system, const QStringList& paramList) diff --git a/src/printsupport/platform/windows/qwindowsprintersupport.cpp b/src/printsupport/platform/windows/qwindowsprintersupport.cpp index 6fd5aef47f..fbf11fe93e 100644 --- a/src/printsupport/platform/windows/qwindowsprintersupport.cpp +++ b/src/printsupport/platform/windows/qwindowsprintersupport.cpp @@ -93,7 +93,7 @@ class QWindowsPrinterSupportPlugin : public QPlatformPrinterSupportPlugin Q_PLUGIN_METADATA(IID QPlatformPrinterSupportFactoryInterface_iid FILE "windows.json") public: - QPlatformPrinterSupport *create(const QString &); + QPlatformPrinterSupport *create(const QString &) override; }; QPlatformPrinterSupport *QWindowsPrinterSupportPlugin::create(const QString &key) |