summaryrefslogtreecommitdiffstats
path: root/src/core/nodes/qnode_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-06-09 15:26:58 +0200
committerSean Harmer <sean.harmer@kdab.com>2015-06-11 19:27:56 +0000
commit3fc58a37f50cbae3d3e551dc6311771b561175cd (patch)
treef85094e6b55b450f2a2656427f07cf82f7b7d6a9 /src/core/nodes/qnode_p.h
parent1d2818870034eacb1b0b6de3df279284d3ad24c3 (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 'src/core/nodes/qnode_p.h')
-rw-r--r--src/core/nodes/qnode_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/nodes/qnode_p.h b/src/core/nodes/qnode_p.h
index 7e654bf7a..11f64be9c 100644
--- a/src/core/nodes/qnode_p.h
+++ b/src/core/nodes/qnode_p.h
@@ -74,18 +74,22 @@ public:
QSceneInterface *m_scene;
mutable QNodeId m_id;
bool m_blockNotifications;
+ bool m_wasCleanedUp;
static QNodePrivate *get(QNode *q);
static void nodePtrDeleter(QNode *q);
private:
- void addChild(QNode *childNode);
- void removeChild(QNode *childNode);
- void removeAllChildren();
+ void _q_addChild(QNode *childNode);
+ void _q_removeChild(QNode *childNode);
void registerNotifiedProperties();
void unregisterNotifiedProperties();
void propertyChanged(int propertyIndex);
+ void setSceneHelper(QNode *root);
+ void unsetSceneHelper(QNode *root);
+ void addEntityComponentToScene(QNode *root);
+
friend class PropertyChangeHandler<QNodePrivate>;
bool m_propertyChangesSetup;
PropertyChangeHandler<QNodePrivate> m_signals;