ProjectExplorer: Add and use addNestedNode(...) that takes unique_ptr

Change-Id: Ieb26721d053111fb350494e31d1f6da3fe642420
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Tobias Hunger
2018-04-26 15:07:56 +02:00
parent f9585d939f
commit d332954567
10 changed files with 44 additions and 39 deletions

View File

@@ -365,9 +365,9 @@ void QmlProject::generateProjectTree()
const Utils::FileName fileName = Utils::FileName::fromString(f);
const FileType fileType = (fileName == projectFilePath())
? FileType::Project : FileNode::fileTypeForFileName(fileName);
newRoot->addNestedNode(new FileNode(fileName, fileType, false));
newRoot->addNestedNode(std::make_unique<FileNode>(fileName, fileType, false));
}
newRoot->addNestedNode(new FileNode(projectFilePath(), FileType::Project, false));
newRoot->addNestedNode(std::make_unique<FileNode>(projectFilePath(), FileType::Project, false));
setRootProjectNode(std::move(newRoot));
refreshTargetDirectory();