summaryrefslogtreecommitdiffstats
path: root/src/core/nodes/qnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/nodes/qnode.cpp')
-rw-r--r--src/core/nodes/qnode.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp
index 6f19e7217..4cdd9ca7b 100644
--- a/src/core/nodes/qnode.cpp
+++ b/src/core/nodes/qnode.cpp
@@ -79,6 +79,10 @@ QNodePrivate::QNodePrivate()
QNodePrivate::~QNodePrivate()
{
+ // Disconnect each connection that was stored
+ for (auto it = m_destructionConnections.begin(), end = m_destructionConnections.end(); it != end; ++it)
+ QObject::disconnect(it.value());
+ m_destructionConnections.clear();
}
void QNodePrivate::init(QNode *parent)
@@ -626,6 +630,7 @@ QNode::~QNode()
{
// Notify the backend that the parent lost this node as a child and
// that this node is being destroyed.
+ Q_EMIT nodeDestroyed();
Q_D(QNode);
d->notifyDestructionChangesAndRemoveFromScene();
}