ProjectExplorer: Use setter for VirtualFolder's priority

More uniform code.

Change-Id: I9a10a1bb15b0df9cf30c68d2c0537bfae2bed98a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-02-26 07:52:24 +01:00
parent 4d2981b1f4
commit 7bf10a5842
5 changed files with 11 additions and 11 deletions

View File

@@ -269,7 +269,8 @@ static void addCMakeVFolder(FolderNode *base, const Utils::FileName &basePath, i
return;
FolderNode *folder = base;
if (!displayName.isEmpty()) {
auto newFolder = std::make_unique<VirtualFolderNode>(basePath, priority);
auto newFolder = std::make_unique<VirtualFolderNode>(basePath);
newFolder->setPriority(priority);
newFolder->setDisplayName(displayName);
folder = newFolder.get();
base->addNode(std::move(newFolder));
@@ -954,8 +955,8 @@ void ServerModeReader::addHeaderNodes(ProjectNode *root, const QList<FileNode *>
static QIcon headerNodeIcon
= Core::FileIconProvider::directoryIcon(ProjectExplorer::Constants::FILEOVERLAY_H);
auto headerNode
= std::make_unique<VirtualFolderNode>(root->filePath(), Node::DefaultPriority - 5);
auto headerNode = std::make_unique<VirtualFolderNode>(root->filePath());
headerNode->setPriority(Node::DefaultPriority - 5);
headerNode->setDisplayName(tr("<Headers>"));
headerNode->setIcon(headerNodeIcon);