aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/scenegraph/coreapi/qsgnode.h
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2011-06-20 10:53:34 +0200
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2011-06-20 10:53:34 +0200
commit2329582577aab8ee35f93c193f3584e49eaeba34 (patch)
tree02517595df75ed87963d4cac537d91441a75d9eb /src/declarative/scenegraph/coreapi/qsgnode.h
parent87c1d65ee20fadd860969ca2529b24f658d613b8 (diff)
Removed unnecessary calls to QSGNode::destroy().
Diffstat (limited to 'src/declarative/scenegraph/coreapi/qsgnode.h')
-rw-r--r--src/declarative/scenegraph/coreapi/qsgnode.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/declarative/scenegraph/coreapi/qsgnode.h b/src/declarative/scenegraph/coreapi/qsgnode.h
index 2705958e04..cee6b76869 100644
--- a/src/declarative/scenegraph/coreapi/qsgnode.h
+++ b/src/declarative/scenegraph/coreapi/qsgnode.h
@@ -152,16 +152,11 @@ public:
protected:
QSGNode(NodeType type);
- // When a node is destroyed, it will detach from the scene graph and the renderer will be
- // notified about the change. If the node is detached in the base node's destructor, the
- // renderer can't safely cast the node to its original type, since at this point it has been
- // partly destroyed already. To solve this problem, all the node destructors must call a common
- // destroy method.
-
- void destroy();
-
private:
+ friend class QSGRootNode;
+
void init();
+ void destroy();
QSGNode *m_parent;
NodeType m_type;