diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-10-27 08:18:25 -0700 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-28 22:10:27 +0000 |
commit | c7d9d0539a7e7c4da575c14045245c9b28f16547 (patch) | |
tree | d71948566ed5569b9006777d60e640761dd78a3b | |
parent | e9eb5b206bbb8cc3c85759bb8d0bce53adc21257 (diff) |
QSGGeometry: add Q_DISABLE_COPY_MOVE
This is a polymorphic class, so that already tells us this should never
be copied. Moreover, it has a reference member, so the default
assignment operator cannot be instantiated.
error: use of deleted function ‘QSGGeometry& QSGGeometry::operator=(const QSGGeometry&)’
qsggeometry.h:51:22: note: ‘QSGGeometry& QSGGeometry::operator=(const QSGGeometry&)’ is implicitly deleted because the default definition would be ill-formed:
qsggeometry.h:51:22: error: non-static reference member ‘const QSGGeometry::AttributeSet& QSGGeometry::m_attributes’, cannot use default assignment operator
Found while compiling PyQt, which is obviously wrong, but this should
improve the error message output.
Change-Id: I07ec23f3cb174fb197c3fffd1721f614929a18f4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 32b71a40cdbcd77956b309b032caafa02abcc13f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/quick/scenegraph/coreapi/qsggeometry.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.h b/src/quick/scenegraph/coreapi/qsggeometry.h index 1583bfd5b2..4392070b6e 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.h +++ b/src/quick/scenegraph/coreapi/qsggeometry.h @@ -165,6 +165,7 @@ public: void setLineWidth(float w); private: + Q_DISABLE_COPY_MOVE(QSGGeometry) friend class QSGGeometryData; int m_drawing_mode; |