diff options
Diffstat (limited to 'src/gui/opengl/qopenglpixeltransferoptions.h')
-rw-r--r-- | src/gui/opengl/qopenglpixeltransferoptions.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/opengl/qopenglpixeltransferoptions.h b/src/gui/opengl/qopenglpixeltransferoptions.h index 1a5d3f00e2..c150e8aff4 100644 --- a/src/gui/opengl/qopenglpixeltransferoptions.h +++ b/src/gui/opengl/qopenglpixeltransferoptions.h @@ -60,6 +60,14 @@ public: QOpenGLPixelTransferOptions &operator=(const QOpenGLPixelTransferOptions &); ~QOpenGLPixelTransferOptions(); +#ifdef Q_COMPILER_RVALUE_REFS + QOpenGLPixelTransferOptions &operator=(QOpenGLPixelTransferOptions &&other) + { swap(other); return *this; } +#endif + + void swap(QOpenGLPixelTransferOptions &other) + { data.swap(other.data); } + void setAlignment(int alignment); int alignment() const; @@ -88,6 +96,8 @@ private: QSharedDataPointer<QOpenGLPixelTransferOptionsData> data; }; +Q_DECLARE_SHARED(QOpenGLPixelTransferOptions) + QT_END_NAMESPACE #endif // QT_NO_OPENGL |