diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-06 10:45:53 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-06 09:06:23 +0000 |
commit | eacd78950282bb835e9b8b4e955b4f93f3c5167f (patch) | |
tree | 9bcd11fec8004affd80febe1ada951ad72bb88f9 /src/plugins/platforms/windows/qwindowsopenglcontext.h | |
parent | b3574edd2feaf907956e36f8fd0e84d3638d8652 (diff) |
Windows QPA: Fix clang-tidy-warnings about class definitions
- Use ' = default' for trivial constructors/destructors
- Remove unneeded destructors
- replace virtual by override or add override where applicable
- Add Q_DISABLE_COPY
Change-Id: Ic7a61579dbc845769beada4fc79bb5dd310e5e52
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsopenglcontext.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsopenglcontext.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowsopenglcontext.h b/src/plugins/platforms/windows/qwindowsopenglcontext.h index d162acdde3..cc6d93d35e 100644 --- a/src/plugins/platforms/windows/qwindowsopenglcontext.h +++ b/src/plugins/platforms/windows/qwindowsopenglcontext.h @@ -51,9 +51,10 @@ class QWindowsOpenGLContext; class QWindowsStaticOpenGLContext { + Q_DISABLE_COPY(QWindowsStaticOpenGLContext) public: static QWindowsStaticOpenGLContext *create(); - virtual ~QWindowsStaticOpenGLContext() { } + virtual ~QWindowsStaticOpenGLContext() = default; virtual QWindowsOpenGLContext *createContext(QOpenGLContext *context) = 0; virtual void *moduleHandle() const = 0; @@ -65,15 +66,17 @@ public: virtual void *createWindowSurface(void * /*nativeWindow*/, void * /*nativeConfig*/, int * /*err*/) { return 0; } virtual void destroyWindowSurface(void * /*nativeSurface*/) { } +protected: + QWindowsStaticOpenGLContext() = default; + private: static QWindowsStaticOpenGLContext *doCreate(); }; class QWindowsOpenGLContext : public QPlatformOpenGLContext { + Q_DISABLE_COPY(QWindowsOpenGLContext) public: - virtual ~QWindowsOpenGLContext() { } - // Returns the native context handle (e.g. HGLRC for WGL, EGLContext for EGL). virtual void *nativeContext() const = 0; @@ -81,6 +84,9 @@ public: // For others, like WGL, they are not relevant. virtual void *nativeDisplay() const { return 0; } virtual void *nativeConfig() const { return 0; } + +protected: + QWindowsOpenGLContext() = default; }; #endif // QT_NO_OPENGL |