diff options
author | David Schulz <[email protected]> | 2024-09-13 15:19:45 +0200 |
---|---|---|
committer | David Schulz <[email protected]> | 2024-09-17 06:56:44 +0000 |
commit | 42ba58e29d930ec8a1dae667376e8b88852bfb63 (patch) | |
tree | a3a3d51ae654a69947bc11218ec5b9b0b323cca4 /src/plugins/nim | |
parent | 00057a94d54585adfd9edba60520151fb75d663e (diff) |
ProjectExplorer: improve treescanner scan result
Allow returning all folders scanned by the treescanner. This will be
used in the WorkspaceProject to also show empty folders in the project
tree. Additionally we are now able to iterate over the complete tree of
folder nodes and add the paths to the watcher instead of walking the
directory tree again to collect all directories to watch.
Change-Id: Ibe7bed9ccee8317918e06fc78ca85f74102d46fc
Reviewed-by: Marcus Tillmanns <[email protected]>
Diffstat (limited to 'src/plugins/nim')
-rw-r--r-- | src/plugins/nim/project/nimbuildsystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/nim/project/nimbuildsystem.cpp b/src/plugins/nim/project/nimbuildsystem.cpp index 0458d847bd1..5ffd852c41a 100644 --- a/src/plugins/nim/project/nimbuildsystem.cpp +++ b/src/plugins/nim/project/nimbuildsystem.cpp @@ -36,8 +36,8 @@ NimProjectScanner::NimProjectScanner(Project *project) connect(&m_scanner, &TreeScanner::finished, this, [this] { // Collect scanned nodes std::vector<std::unique_ptr<FileNode>> nodes; - const TreeScanner::Result scanResult = m_scanner.release(); - for (FileNode *node : scanResult.allFiles) { + TreeScanner::Result scanResult = m_scanner.release(); + for (FileNode *node : scanResult.takeAllFiles()) { if (!node->path().endsWith(".nim") && !node->path().endsWith(".nimble")) node->setEnabled(false); // Disable files that do not end in .nim nodes.emplace_back(node); |