aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2021-06-16 11:33:35 +0200
committerEike Ziller <[email protected]>2021-06-23 14:25:08 +0000
commit9109a6895ee02f02fe675643433529b605819f5d (patch)
tree8657ba79abde04d12d78692f1445a91a333db982 /src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
parentfd6ec7da2562be1f984624fc2605a3d64639f89d (diff)
CMake: Do not create file system node in main thread
The file system scanning was already in a thread, but creating a tree from the flat list of file nodes was still done in the main thread. Creating the tree looks for and creates folder nodes as needed for each file node, which is not that big of a deal but still takes 1/3 of a second for the Qt Creator source tree. Task-number: QTCREATORBUG-25783 Change-Id: I28948ed3ff5233f6fc4b86e93da94d882b81e231 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Cristian Adam <[email protected]>
Diffstat (limited to 'src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp')
-rw-r--r--src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp b/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
index 23c65a014af..0a0485e1896 100644
--- a/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
+++ b/src/plugins/compilationdatabaseprojectmanager/compilationdbparser.cpp
@@ -138,8 +138,9 @@ void CompilationDbParser::stop()
QList<FileNode *> CompilationDbParser::scannedFiles() const
{
- return m_treeScanner && !m_treeScanner->future().isCanceled()
- ? m_treeScanner->release() : QList<FileNode *>();
+ const TreeScanner::Result result = m_treeScanner->release();
+ return m_treeScanner && !m_treeScanner->future().isCanceled() ? result.allFiles
+ : QList<FileNode *>();
}
void CompilationDbParser::finish(ParseResult result)