From 6d508fa954a2d90e90dff5a2e509aecd13b18f8f Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Tue, 12 Apr 2016 15:23:26 +0200 Subject: QNode: make cleanup a private slot QT3D_CLONEABLE now implements a default dtor that calls _q_ cleanup QT3D_CLONEABLE_CUSTOM_DTOR is used for classes that really need to implement their own dtor but they need to invoke _q_cleanup manually Change-Id: I2937a3b9edeb5a763749f0044360d78ab4461a5e Task-number: QTBUG-51464 Reviewed-by: Sean Harmer --- tests/auto/core/nodes/tst_nodes.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/auto/core/nodes/tst_nodes.cpp') diff --git a/tests/auto/core/nodes/tst_nodes.cpp b/tests/auto/core/nodes/tst_nodes.cpp index 973db6c0e..418625c31 100644 --- a/tests/auto/core/nodes/tst_nodes.cpp +++ b/tests/auto/core/nodes/tst_nodes.cpp @@ -169,7 +169,7 @@ public: ~MyQNode() { - QNode::cleanup(); + QMetaObject::invokeMethod(this, "_q_cleanup", Qt::DirectConnection); delete m_scene; } @@ -203,7 +203,7 @@ signals: void customPropertyChanged(); protected: - QT3D_CLONEABLE(MyQNode) + QT3D_CLONEABLE_CUSTOM_DTOR(MyQNode) QString m_customProperty; Qt3DCore::QScene *m_scene; @@ -216,11 +216,6 @@ public: explicit MyQComponent(Qt3DCore::QNode *parent = 0) : QComponent(parent) {} - ~MyQComponent() - { - QNode::cleanup(); - } - // QNode interface protected: QT3D_CLONEABLE(MyQComponent) -- cgit v1.2.3