summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprojectmanager
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2018-04-26 15:07:56 +0200
committerTobias Hunger <tobias.hunger@qt.io>2018-05-02 14:55:15 +0000
commitd3329545674ba6ee0233477f0821741e496c6b77 (patch)
tree954c1f17402d3d3c6097c6886300ae5809a36066 /src/plugins/qmlprojectmanager
parentf9585d939f6a140ecbf6526d30c294048060b246 (diff)
downloadqt-creator-d3329545674ba6ee0233477f0821741e496c6b77.tar.gz
ProjectExplorer: Add and use addNestedNode(...) that takes unique_ptr
Change-Id: Ieb26721d053111fb350494e31d1f6da3fe642420 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/plugins/qmlprojectmanager')
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index 2711afb394..f8996b8786 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -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();