diff --git a/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp b/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp index 696c8465ca8..a302b4db08d 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodetreebuilder.cpp @@ -168,7 +168,7 @@ static void createTree(const QmakePriFile *pri, QmakePriFileNode *node, const Fi int eid = vfs->idForFileName(file.toString(), QMakeVfs::VfsExact); vfs->readFile(eid, &contents, &errorMessage); } - vfolder->addNode(std::make_unique(file, false, contents, vfolder.get())); + vfolder->addNode(std::make_unique(file, contents, vfolder.get())); } } else { for (const FileName &fn : newFilePaths) { diff --git a/src/plugins/resourceeditor/resourceeditorplugin.cpp b/src/plugins/resourceeditor/resourceeditorplugin.cpp index 4c7efeca47f..c7de69cb630 100644 --- a/src/plugins/resourceeditor/resourceeditorplugin.cpp +++ b/src/plugins/resourceeditor/resourceeditorplugin.cpp @@ -217,8 +217,9 @@ void ResourceEditorPlugin::extensionsInitialized() FolderNode *const pn = file->parentFolderNode(); QTC_ASSERT(pn, continue); const Utils::FileName path = file->filePath(); - pn->replaceSubtree(file, std::make_unique(path, file->isGenerated(), - QString(), pn)); + auto topLevel = std::make_unique(path, QString(), pn); + topLevel->setIsGenerated(file->isGenerated()); + pn->replaceSubtree(file, std::move(topLevel)); } }); } diff --git a/src/plugins/resourceeditor/resourcenode.cpp b/src/plugins/resourceeditor/resourcenode.cpp index ee2099bbc02..5631d9b630a 100644 --- a/src/plugins/resourceeditor/resourcenode.cpp +++ b/src/plugins/resourceeditor/resourcenode.cpp @@ -73,7 +73,7 @@ public: FolderNode *parent = m_node->parentFolderNode(); QTC_ASSERT(parent, return false); parent->replaceSubtree(m_node, std::make_unique( - m_node->filePath(), false, m_node->contents(), parent)); + m_node->filePath(), m_node->contents(), parent)); return true; } @@ -264,11 +264,10 @@ bool SimpleResourceFolderNode::renameFile(const QString &filePath, const QString } // Internal -ResourceTopLevelNode::ResourceTopLevelNode(const FileName &filePath, bool generated, +ResourceTopLevelNode::ResourceTopLevelNode(const FileName &filePath, const QString &contents, FolderNode *parent) : FolderNode(filePath) { - setIsGenerated(generated); setIcon(FileIconProvider::icon(filePath.toString())); setPriority(Node::DefaultFilePriority); setListInProject(true); diff --git a/src/plugins/resourceeditor/resourcenode.h b/src/plugins/resourceeditor/resourcenode.h index 38175c322de..edfd4cb8d03 100644 --- a/src/plugins/resourceeditor/resourcenode.h +++ b/src/plugins/resourceeditor/resourcenode.h @@ -34,7 +34,7 @@ namespace Internal { class ResourceFileWatcher; } class RESOURCE_EXPORT ResourceTopLevelNode : public ProjectExplorer::FolderNode { public: - ResourceTopLevelNode(const Utils::FileName &filePath, bool generated, + ResourceTopLevelNode(const Utils::FileName &filePath, const QString &contents, FolderNode *parent); ~ResourceTopLevelNode() override;