ProjectExplorer: Use a setter for the Node's type

Change-Id: I3cc496151888cdecff0be54043a24fefe5ee2b02
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-02-25 18:32:12 +01:00
parent ffa88006a5
commit 65be7c2915
4 changed files with 25 additions and 18 deletions

View File

@@ -249,8 +249,7 @@ QStringList relativeDirsList(Utils::FileName currentPath, const Utils::FileName
FolderNode *addChildFolderNode(FolderNode *parent, const QString &childName)
{
Utils::FileName parentPath = parent->filePath();
auto node = std::make_unique<FolderNode>(
parentPath.appendPath(childName), NodeType::Folder);
auto node = std::make_unique<FolderNode>(parentPath.appendPath(childName));
FolderNode *childNode = node.get();
childNode->setDisplayName(childName);
parent->addNode(std::move(node));