From 3fc58a37f50cbae3d3e551dc6311771b561175cd Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Tue, 9 Jun 2015 15:26:58 +0200 Subject: QNode parent changes - introduce QNode::setParent(QNode *) - QNode created with explicit parent now invoke QNodePrivate::_q_addChild - QNode::cleanup introduces, need to be added to the dtor of every QT3D_CLONABLE QNode subclass. Handles proper destruction. - QNode::cleanup added to all classes that should have it. - Updated unit tests of Nodes, Entity, Scene Change-Id: Id2c2784122a78edaae5580fe5976d88be5a1921c Task-number: QTBUG-45947 Reviewed-by: Sean Harmer --- examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp | 5 +++++ examples/qt3d/tessellation-modes/tessellatedquadmesh.h | 1 + 2 files changed, 6 insertions(+) (limited to 'examples/qt3d/tessellation-modes') diff --git a/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp b/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp index 6b04e5da3..08a3f54b3 100644 --- a/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp +++ b/examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp @@ -45,6 +45,11 @@ TessellatedQuadMesh::TessellatedQuadMesh(Qt3D::QNode *parent) { } +TessellatedQuadMesh::~TessellatedQuadMesh() +{ + QNode::cleanup(); +} + class TessellatedQuadMeshFunctor : public Qt3D::QAbstractMeshFunctor { public: diff --git a/examples/qt3d/tessellation-modes/tessellatedquadmesh.h b/examples/qt3d/tessellation-modes/tessellatedquadmesh.h index 76b00ae01..0bb6459ef 100644 --- a/examples/qt3d/tessellation-modes/tessellatedquadmesh.h +++ b/examples/qt3d/tessellation-modes/tessellatedquadmesh.h @@ -44,6 +44,7 @@ class TessellatedQuadMesh : public Qt3D::QAbstractMesh Q_OBJECT public: explicit TessellatedQuadMesh(Qt3D::QNode *parent = 0); + ~TessellatedQuadMesh(); Qt3D::QAbstractMeshFunctorPtr meshFunctor() const Q_DECL_OVERRIDE; -- cgit v1.2.3