diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2015-06-09 15:26:58 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-06-11 19:27:56 +0000 |
commit | 3fc58a37f50cbae3d3e551dc6311771b561175cd (patch) | |
tree | f85094e6b55b450f2a2656427f07cf82f7b7d6a9 /examples/qt3d/tessellation-modes | |
parent | 1d2818870034eacb1b0b6de3df279284d3ad24c3 (diff) |
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 <sean.harmer@kdab.com>
Diffstat (limited to 'examples/qt3d/tessellation-modes')
-rw-r--r-- | examples/qt3d/tessellation-modes/tessellatedquadmesh.cpp | 5 | ||||
-rw-r--r-- | examples/qt3d/tessellation-modes/tessellatedquadmesh.h | 1 |
2 files changed, 6 insertions, 0 deletions
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; |