ProjectExplorer: Use unique_ptr to hold ProjectNodes

Change-Id: Iaa5bea221686564de24138a99b5fe0d09521c118
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Tobias Hunger
2018-04-26 11:00:59 +02:00
parent dc982a1326
commit 1f55ba9012
4 changed files with 55 additions and 41 deletions

View File

@@ -496,7 +496,7 @@ void Project::setRootProjectNode(ProjectNode *root)
if (d->m_rootProjectNode.get() == root)
return;
if (root && root->nodes().isEmpty()) {
if (root && root->isEmpty()) {
// Something went wrong with parsing: At least the project file needs to be
// shown so that the user can fix the breakage.
// Do not leak root and use default project tree in this case.