summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopenglbuffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qopenglbuffer.h')
-rw-r--r--src/opengl/qopenglbuffer.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/opengl/qopenglbuffer.h b/src/opengl/qopenglbuffer.h
index 1325b7e6e0..b9f2265ca0 100644
--- a/src/opengl/qopenglbuffer.h
+++ b/src/opengl/qopenglbuffer.h
@@ -8,7 +8,6 @@
#ifndef QT_NO_OPENGL
-#include <QtCore/qscopedpointer.h>
#include <QtGui/qopengl.h>
QT_BEGIN_NAMESPACE
@@ -30,9 +29,15 @@ public:
QOpenGLBuffer();
explicit QOpenGLBuffer(QOpenGLBuffer::Type type);
QOpenGLBuffer(const QOpenGLBuffer &other);
+ QOpenGLBuffer(QOpenGLBuffer &&other) noexcept
+ : d_ptr{std::exchange(other.d_ptr, nullptr)} {}
~QOpenGLBuffer();
QOpenGLBuffer &operator=(const QOpenGLBuffer &other);
+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QOpenGLBuffer)
+
+ void swap(QOpenGLBuffer &other) noexcept
+ { return qt_ptr_swap(d_ptr, other.d_ptr); }
enum UsagePattern
{
@@ -99,6 +104,7 @@ private:
Q_DECLARE_PRIVATE(QOpenGLBuffer)
};
+Q_DECLARE_SHARED(QOpenGLBuffer)
Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLBuffer::RangeAccessFlags)