diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2018-04-26 15:07:56 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2018-05-02 14:55:15 +0000 |
commit | d3329545674ba6ee0233477f0821741e496c6b77 (patch) | |
tree | 954c1f17402d3d3c6097c6886300ae5809a36066 /src/plugins/projectexplorer/projectnodes.h | |
parent | f9585d939f6a140ecbf6526d30c294048060b246 (diff) |
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/projectexplorer/projectnodes.h')
-rw-r--r-- | src/plugins/projectexplorer/projectnodes.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h index e2aa2940dd..db586ebd10 100644 --- a/src/plugins/projectexplorer/projectnodes.h +++ b/src/plugins/projectexplorer/projectnodes.h @@ -223,14 +223,14 @@ public: FileNode *fileNode(const Utils::FileName &file) const; QList<FolderNode *> folderNodes() const; using FolderNodeFactory = std::function<std::unique_ptr<FolderNode>(const Utils::FileName &)>; - void addNestedNodes(const QList<FileNode *> &files, const Utils::FileName &overrideBaseDir = Utils::FileName(), - const FolderNodeFactory &factory = [](const Utils::FileName &fn) { - return std::make_unique<FolderNode>(fn); - }); - void addNestedNode(FileNode *fileNode, const Utils::FileName &overrideBaseDir = Utils::FileName(), - const FolderNodeFactory &factory = [](const Utils::FileName &fn) { - return std::make_unique<FolderNode>(fn); - }); + void addNestedNodes(const QList<FileNode *> &files, + const Utils::FileName &overrideBaseDir = Utils::FileName(), + const FolderNodeFactory &factory + = [](const Utils::FileName &fn) {return std::make_unique<FolderNode>(fn); }); + void addNestedNode(std::unique_ptr<FileNode> &&fileNode, + const Utils::FileName &overrideBaseDir = Utils::FileName(), + const FolderNodeFactory &factory + = [](const Utils::FileName &fn) { return std::make_unique<FolderNode>(fn); }); void compress(); bool isAncesterOf(Node *n); |