summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2020-07-23 08:19:45 +0200
committerKai Koehne <kai.koehne@qt.io>2020-08-10 11:56:54 +0200
commit177f040c6c79571eadaf51c3e4ad90ae7b023b0d (patch)
treefce6d1ced37fc64df9e0ce9800366ab0acf7fc6f /src/plugins/platforms/windows
parent7c861a36f98972b64379589477930e2e894b0d72 (diff)
Fix build with mingw gcc 9 and -Wsuggest-override
Change-Id: I780b0761a7f6b19022116b738efa7aca1378b715 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/main.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowscombase.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp23
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsdrag.h10
-rw-r--r--src/plugins/platforms/windows/qwindowsdropdataobject.h4
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h3
-rw-r--r--src/plugins/platforms/windows/qwindowsole.h30
8 files changed, 46 insertions, 36 deletions
diff --git a/src/plugins/platforms/windows/main.cpp b/src/plugins/platforms/windows/main.cpp
index 94d8470ab1..a3f81ec9fc 100644
--- a/src/plugins/platforms/windows/main.cpp
+++ b/src/plugins/platforms/windows/main.cpp
@@ -101,7 +101,7 @@ class QWindowsIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "windows.json")
public:
- QPlatformIntegration *create(const QString&, const QStringList&, int &, char **);
+ QPlatformIntegration *create(const QString &, const QStringList &, int &, char **) override;
};
QPlatformIntegration *QWindowsIntegrationPlugin::create(const QString& system, const QStringList& paramList, int &, char **)
diff --git a/src/plugins/platforms/windows/qwindowscombase.h b/src/plugins/platforms/windows/qwindowscombase.h
index bb4b295395..9f6f11170f 100644
--- a/src/plugins/platforms/windows/qwindowscombase.h
+++ b/src/plugins/platforms/windows/qwindowscombase.h
@@ -85,16 +85,16 @@ public:
explicit QWindowsComBase(ULONG initialRefCount = 1) : m_ref(initialRefCount) {}
virtual ~QWindowsComBase() = default;
- HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface)
+ HRESULT STDMETHODCALLTYPE QueryInterface(REFIID id, LPVOID *iface) override
{
*iface = nullptr;
return qWindowsComQueryInterface<IUnknown>(this, id, iface) || qWindowsComQueryInterface<ComInterface>(this, id, iface)
? S_OK : E_NOINTERFACE;
}
- ULONG STDMETHODCALLTYPE AddRef() { return ++m_ref; }
+ ULONG STDMETHODCALLTYPE AddRef() override { return ++m_ref; }
- ULONG STDMETHODCALLTYPE Release()
+ ULONG STDMETHODCALLTYPE Release() override
{
if (!--m_ref) {
delete this;
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index 16a9110918..51b7b6d175 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -273,7 +273,7 @@ public:
explicit QWindowsDialogThread(const QWindowsNativeDialogBasePtr &d, HWND owner)
: m_dialog(d), m_owner(owner) {}
- void run();
+ void run() override;
private:
const QWindowsNativeDialogBasePtr m_dialog;
@@ -508,14 +508,21 @@ public:
static IFileDialogEvents *create(QWindowsNativeFileDialogBase *nativeFileDialog);
// IFileDialogEvents methods
- IFACEMETHODIMP OnFileOk(IFileDialog *);
- IFACEMETHODIMP OnFolderChange(IFileDialog *) { return S_OK; }
- IFACEMETHODIMP OnFolderChanging(IFileDialog *, IShellItem *);
+ IFACEMETHODIMP OnFileOk(IFileDialog *) override;
+ IFACEMETHODIMP OnFolderChange(IFileDialog *) override { return S_OK; }
+ IFACEMETHODIMP OnFolderChanging(IFileDialog *, IShellItem *) override;
IFACEMETHODIMP OnHelp(IFileDialog *) { return S_OK; }
- IFACEMETHODIMP OnSelectionChange(IFileDialog *);
- IFACEMETHODIMP OnShareViolation(IFileDialog *, IShellItem *, FDE_SHAREVIOLATION_RESPONSE *) { return S_OK; }
- IFACEMETHODIMP OnTypeChange(IFileDialog *);
- IFACEMETHODIMP OnOverwrite(IFileDialog *, IShellItem *, FDE_OVERWRITE_RESPONSE *) { return S_OK; }
+ IFACEMETHODIMP OnSelectionChange(IFileDialog *) override;
+ IFACEMETHODIMP OnShareViolation(IFileDialog *, IShellItem *,
+ FDE_SHAREVIOLATION_RESPONSE *) override
+ {
+ return S_OK;
+ }
+ IFACEMETHODIMP OnTypeChange(IFileDialog *) override;
+ IFACEMETHODIMP OnOverwrite(IFileDialog *, IShellItem *, FDE_OVERWRITE_RESPONSE *) override
+ {
+ return S_OK;
+ }
QWindowsNativeFileDialogEventHandler(QWindowsNativeFileDialogBase *nativeFileDialog) :
m_nativeFileDialog(nativeFileDialog) {}
diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp
index bb1e1345dc..1c27e4e85b 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.cpp
+++ b/src/plugins/platforms/windows/qwindowsdrag.cpp
@@ -231,8 +231,8 @@ public:
void createCursors();
// IDropSource methods
- STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD grfKeyState);
- STDMETHOD(GiveFeedback)(DWORD dwEffect);
+ STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD grfKeyState) override;
+ STDMETHOD(GiveFeedback)(DWORD dwEffect) override;
private:
struct CursorEntry {
diff --git a/src/plugins/platforms/windows/qwindowsdrag.h b/src/plugins/platforms/windows/qwindowsdrag.h
index 5f30c59882..33b583b479 100644
--- a/src/plugins/platforms/windows/qwindowsdrag.h
+++ b/src/plugins/platforms/windows/qwindowsdrag.h
@@ -66,10 +66,12 @@ public:
~QWindowsOleDropTarget() override;
// IDropTarget methods
- STDMETHOD(DragEnter)(LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect);
- STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect);
- STDMETHOD(DragLeave)();
- STDMETHOD(Drop)(LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect);
+ STDMETHOD(DragEnter)
+ (LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) override;
+ STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) override;
+ STDMETHOD(DragLeave)() override;
+ STDMETHOD(Drop)
+ (LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect) override;
private:
void handleDrag(QWindow *window, DWORD grfKeyState, const QPoint &, LPDWORD pdwEffect);
diff --git a/src/plugins/platforms/windows/qwindowsdropdataobject.h b/src/plugins/platforms/windows/qwindowsdropdataobject.h
index 16ba7b036a..407c809243 100644
--- a/src/plugins/platforms/windows/qwindowsdropdataobject.h
+++ b/src/plugins/platforms/windows/qwindowsdropdataobject.h
@@ -51,8 +51,8 @@ public:
~QWindowsDropDataObject() override;
// overridden IDataObject methods
- STDMETHOD(GetData)(LPFORMATETC pformatetcIn, LPSTGMEDIUM pmedium);
- STDMETHOD(QueryGetData)(LPFORMATETC pformatetc);
+ STDMETHOD(GetData)(LPFORMATETC pformatetcIn, LPSTGMEDIUM pmedium) override;
+ STDMETHOD(QueryGetData)(LPFORMATETC pformatetc) override;
private:
bool shouldIgnore(LPFORMATETC pformatetc) const;
diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h
index eaf62c750d..e0af1e6512 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.h
+++ b/src/plugins/platforms/windows/qwindowsintegration.h
@@ -95,7 +95,8 @@ public:
static QWindowsStaticOpenGLContext *staticOpenGLContext();
HMODULE openGLModuleHandle() const override;
- QOpenGLContext *createOpenGLContext(HGLRC context, HWND window, QOpenGLContext *shareContext) const;
+ QOpenGLContext *createOpenGLContext(HGLRC context, HWND window,
+ QOpenGLContext *shareContext) const override;
#endif
QAbstractEventDispatcher *createEventDispatcher() const override;
void initialize() override;
diff --git a/src/plugins/platforms/windows/qwindowsole.h b/src/plugins/platforms/windows/qwindowsole.h
index 759779c6c3..c556a3fb9c 100644
--- a/src/plugins/platforms/windows/qwindowsole.h
+++ b/src/plugins/platforms/windows/qwindowsole.h
@@ -65,17 +65,17 @@ public:
DWORD reportedPerformedEffect() const;
// IDataObject methods
- STDMETHOD(GetData)(LPFORMATETC pformatetcIn, LPSTGMEDIUM pmedium);
- STDMETHOD(GetDataHere)(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium);
- STDMETHOD(QueryGetData)(LPFORMATETC pformatetc);
- STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pformatetc, LPFORMATETC pformatetcOut);
- STDMETHOD(SetData)(LPFORMATETC pformatetc, STGMEDIUM FAR * pmedium,
- BOOL fRelease);
- STDMETHOD(EnumFormatEtc)(DWORD dwDirection, LPENUMFORMATETC FAR* ppenumFormatEtc);
- STDMETHOD(DAdvise)(FORMATETC FAR* pFormatetc, DWORD advf,
- LPADVISESINK pAdvSink, DWORD FAR* pdwConnection);
- STDMETHOD(DUnadvise)(DWORD dwConnection);
- STDMETHOD(EnumDAdvise)(LPENUMSTATDATA FAR* ppenumAdvise);
+ STDMETHOD(GetData)(LPFORMATETC pformatetcIn, LPSTGMEDIUM pmedium) override;
+ STDMETHOD(GetDataHere)(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium) override;
+ STDMETHOD(QueryGetData)(LPFORMATETC pformatetc) override;
+ STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pformatetc, LPFORMATETC pformatetcOut) override;
+ STDMETHOD(SetData)(LPFORMATETC pformatetc, STGMEDIUM FAR *pmedium, BOOL fRelease) override;
+ STDMETHOD(EnumFormatEtc)(DWORD dwDirection, LPENUMFORMATETC FAR *ppenumFormatEtc) override;
+ STDMETHOD(DAdvise)
+ (FORMATETC FAR *pFormatetc, DWORD advf, LPADVISESINK pAdvSink,
+ DWORD FAR *pdwConnection) override;
+ STDMETHOD(DUnadvise)(DWORD dwConnection) override;
+ STDMETHOD(EnumDAdvise)(LPENUMSTATDATA FAR *ppenumAdvise) override;
private:
QPointer<QMimeData> data;
@@ -93,10 +93,10 @@ public:
bool isNull() const;
// IEnumFORMATETC methods
- STDMETHOD(Next)(ULONG celt, LPFORMATETC rgelt, ULONG FAR* pceltFetched);
- STDMETHOD(Skip)(ULONG celt);
- STDMETHOD(Reset)(void);
- STDMETHOD(Clone)(LPENUMFORMATETC FAR* newEnum);
+ STDMETHOD(Next)(ULONG celt, LPFORMATETC rgelt, ULONG FAR *pceltFetched) override;
+ STDMETHOD(Skip)(ULONG celt) override;
+ STDMETHOD(Reset)(void) override;
+ STDMETHOD(Clone)(LPENUMFORMATETC FAR *newEnum) override;
private:
bool copyFormatEtc(LPFORMATETC dest, const FORMATETC *src) const;