Fix mingw compiler warnings

Mark overridden functions with override.
Remove unused static function.

Change-Id: I06bd52c66ac7b970dfced0e553eac9c4a4d44d79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Mårten Nordheim 2021-02-11 15:33:57 +01:00
parent 6e89ed5a3c
commit 153ffff7d5
5 changed files with 23 additions and 33 deletions

View File

@ -103,16 +103,6 @@ static QFont::Weight fromDirectWriteWeight(DWRITE_FONT_WEIGHT weight)
return static_cast<QFont::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) static QFont::Style fromDirectWriteStyle(DWRITE_FONT_STYLE style)
{ {
switch (style) { switch (style) {

View File

@ -317,15 +317,15 @@ namespace {
{ {
} }
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object); HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) override;
ULONG STDMETHODCALLTYPE AddRef(); ULONG STDMETHODCALLTYPE AddRef() override;
ULONG STDMETHODCALLTYPE Release(); ULONG STDMETHODCALLTYPE Release() override;
HRESULT STDMETHODCALLTYPE ReadFileFragment(const void **fragmentStart, UINT64 fileOffset, HRESULT STDMETHODCALLTYPE ReadFileFragment(const void **fragmentStart, UINT64 fileOffset,
UINT64 fragmentSize, OUT void **fragmentContext); UINT64 fragmentSize, OUT void **fragmentContext) override;
void STDMETHODCALLTYPE ReleaseFileFragment(void *fragmentContext); void STDMETHODCALLTYPE ReleaseFileFragment(void *fragmentContext) override;
HRESULT STDMETHODCALLTYPE GetFileSize(OUT UINT64 *fileSize); HRESULT STDMETHODCALLTYPE GetFileSize(OUT UINT64 *fileSize) override;
HRESULT STDMETHODCALLTYPE GetLastWriteTime(OUT UINT64 *lastWriteTime); HRESULT STDMETHODCALLTYPE GetLastWriteTime(OUT UINT64 *lastWriteTime) override;
private: private:
QByteArray m_fontData; QByteArray m_fontData;
@ -408,13 +408,13 @@ namespace {
m_fontDatas.remove(key); m_fontDatas.remove(key);
} }
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object); HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **object) override;
ULONG STDMETHODCALLTYPE AddRef(); ULONG STDMETHODCALLTYPE AddRef() override;
ULONG STDMETHODCALLTYPE Release(); ULONG STDMETHODCALLTYPE Release() override;
HRESULT STDMETHODCALLTYPE CreateStreamFromKey(void const *fontFileReferenceKey, HRESULT STDMETHODCALLTYPE CreateStreamFromKey(void const *fontFileReferenceKey,
UINT32 fontFileReferenceKeySize, UINT32 fontFileReferenceKeySize,
OUT IDWriteFontFileStream **fontFileStream); OUT IDWriteFontFileStream **fontFileStream) override;
private: private:
ULONG m_referenceCount; ULONG m_referenceCount;

View File

@ -77,17 +77,17 @@ namespace {
} }
virtual ~GeometrySink() = default; virtual ~GeometrySink() = default;
IFACEMETHOD_(void, AddBeziers)(const D2D1_BEZIER_SEGMENT *beziers, UINT bezierCount); IFACEMETHOD_(void, AddBeziers)(const D2D1_BEZIER_SEGMENT *beziers, UINT bezierCount) override;
IFACEMETHOD_(void, AddLines)(const D2D1_POINT_2F *points, UINT pointCount); IFACEMETHOD_(void, AddLines)(const D2D1_POINT_2F *points, UINT pointCount) override;
IFACEMETHOD_(void, BeginFigure)(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin); IFACEMETHOD_(void, BeginFigure)(D2D1_POINT_2F startPoint, D2D1_FIGURE_BEGIN figureBegin) override;
IFACEMETHOD(Close)(); IFACEMETHOD(Close)() override;
IFACEMETHOD_(void, EndFigure)(D2D1_FIGURE_END figureEnd); IFACEMETHOD_(void, EndFigure)(D2D1_FIGURE_END figureEnd) override;
IFACEMETHOD_(void, SetFillMode)(D2D1_FILL_MODE fillMode); IFACEMETHOD_(void, SetFillMode)(D2D1_FILL_MODE fillMode) override;
IFACEMETHOD_(void, SetSegmentFlags)(D2D1_PATH_SEGMENT vertexFlags); IFACEMETHOD_(void, SetSegmentFlags)(D2D1_PATH_SEGMENT vertexFlags) override;
IFACEMETHOD_(unsigned long, AddRef)(); IFACEMETHOD_(unsigned long, AddRef)() override;
IFACEMETHOD_(unsigned long, Release)(); IFACEMETHOD_(unsigned long, Release)() override;
IFACEMETHOD(QueryInterface)(IID const &riid, void **ppvObject); IFACEMETHOD(QueryInterface)(IID const &riid, void **ppvObject) override;
private: private:
inline static QPointF fromD2D1_POINT_2F(const D2D1_POINT_2F &inp) inline static QPointF fromD2D1_POINT_2F(const D2D1_POINT_2F &inp)

View File

@ -49,7 +49,7 @@ class QWindowsDirect2DIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "direct2d.json") Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "direct2d.json")
public: public:
QPlatformIntegration *create(const QString&, const QStringList&); QPlatformIntegration *create(const QString&, const QStringList&) override;
}; };
QPlatformIntegration *QWindowsDirect2DIntegrationPlugin::create(const QString& system, const QStringList& paramList) QPlatformIntegration *QWindowsDirect2DIntegrationPlugin::create(const QString& system, const QStringList& paramList)

View File

@ -93,7 +93,7 @@ class QWindowsPrinterSupportPlugin : public QPlatformPrinterSupportPlugin
Q_PLUGIN_METADATA(IID QPlatformPrinterSupportFactoryInterface_iid FILE "windows.json") Q_PLUGIN_METADATA(IID QPlatformPrinterSupportFactoryInterface_iid FILE "windows.json")
public: public:
QPlatformPrinterSupport *create(const QString &); QPlatformPrinterSupport *create(const QString &) override;
}; };
QPlatformPrinterSupport *QWindowsPrinterSupportPlugin::create(const QString &key) QPlatformPrinterSupport *QWindowsPrinterSupportPlugin::create(const QString &key)