From a2c4d27cf9b4992fca6a30e01d31c0a5305b7123 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 27 Oct 2022 08:18:25 -0700 Subject: QSGGeometry: add Q_DISABLE_COPY_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 32b71a40cdbcd77956b309b032caafa02abcc13f) Reviewed-by: Qt Cherry-pick Bot --- src/quick/scenegraph/coreapi/qsggeometry.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quick/scenegraph') diff --git a/src/quick/scenegraph/coreapi/qsggeometry.h b/src/quick/scenegraph/coreapi/qsggeometry.h index 64085393f9..7ea2aa1027 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.h +++ b/src/quick/scenegraph/coreapi/qsggeometry.h @@ -202,6 +202,7 @@ public: void setLineWidth(float w); private: + Q_DISABLE_COPY_MOVE(QSGGeometry) friend class QSGGeometryData; int m_drawing_mode; -- cgit v1.2.3