diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2021-02-11 15:33:57 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2021-02-11 16:59:35 +0100 |
commit | 153ffff7d53933784a19acbb14b3d8cacdea2ece (patch) | |
tree | 00885cf3f221aecba385f15e3f7eed6d4fe442f6 /src/gui/text | |
parent | 6e89ed5a3c13c15b4e62eda7cf46acd8793e84f8 (diff) | |
download | qtbase-153ffff7d53933784a19acbb14b3d8cacdea2ece.tar.gz |
Fix mingw compiler warnings
Mark overridden functions with override.
Remove unused static function.
Change-Id: I06bd52c66ac7b970dfced0e553eac9c4a4d44d79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/windows/qwindowsdirectwritefontdatabase.cpp | 10 | ||||
-rw-r--r-- | src/gui/text/windows/qwindowsfontdatabasebase.cpp | 22 | ||||
-rw-r--r-- | src/gui/text/windows/qwindowsfontenginedirectwrite.cpp | 22 |
3 files changed, 22 insertions, 32 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) |