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, 2 insertions, 3 deletions
diff --git a/src/core/nodes/qnode.cpp b/src/core/nodes/qnode.cpp
index 900c3f8ce..c418e03d5 100644
--- a/src/core/nodes/qnode.cpp
+++ b/src/core/nodes/qnode.cpp
@@ -795,10 +795,9 @@ QNode::~QNode()
{
Q_D(QNode);
// Disconnect each connection that was stored
- for (auto it = d->m_destructionConnections.begin(), end = d->m_destructionConnections.end(); it != end; ++it)
- QObject::disconnect(it.value());
+ for (const auto &nodeConnectionPair : qAsConst(d->m_destructionConnections))
+ QObject::disconnect(nodeConnectionPair.second);
d->m_destructionConnections.clear();
-
Q_EMIT nodeDestroyed();
// Notify the backend that the parent lost this node as a child and