Commit 60ffb91f authored by hjk's avatar hjk Committed by Tobias Hunger

ProjectExplorer: clearer destruction of ToolChainNodes

Change-Id: I7f03d5649230eaa0dd6c54281a10e04f14a8526c
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 8c980f5a
......@@ -73,13 +73,16 @@ public:
~ToolChainNode()
{
if (parent)
parent->childNodes.removeOne(this);
qDeleteAll(childNodes);
// Do not delete tool chain, we do not own it.
Q_ASSERT(childNodes.isEmpty());
for (int i = childNodes.size(); --i >= 0; ) {
ToolChainNode *child = childNodes.at(i);
child->parent = 0;
delete child;
}
if (parent)
parent->childNodes.removeOne(this);
}
ToolChainNode *parent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment