ProjectTree: Fix soft assert

Fix soft assert when accessing the lone project file node in a project
that failed to parse.

Change-Id: I73d9b0012292dd5516a0a9c81cdc4003eebf2a92
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2017-10-15 20:46:47 +02:00
parent 3d0339844e
commit 95bd5b0d68
3 changed files with 10 additions and 0 deletions

View File

@@ -908,4 +908,10 @@ ProjectNode *ContainerNode::rootProjectNode() const
return m_project->rootProjectNode();
}
void ContainerNode::removeAllChildren()
{
qDeleteAll(m_nodes);
m_nodes.clear();
}
} // namespace ProjectExplorer