From ac1c04b6b38a75bc958298d3755a8ed873fba2a5 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 15 Jul 2016 10:18:31 +0200 Subject: [PATCH] AutoTest: Fix document update handling while code model indexing Avoid fetching all files for the startup project again and again while code model is indexing files. The indexing emits documentUpdated signals for all (relevant) processed files. If code model is indexing we perform a full parse anyhow after the indexing has finished. Change-Id: Ibfdb47f403da19d5bab3eb2295447ad451fca2b5 Reviewed-by: Eike Ziller --- src/plugins/autotest/testcodeparser.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/plugins/autotest/testcodeparser.cpp b/src/plugins/autotest/testcodeparser.cpp index a86ec254e62..45f7a07b1b1 100644 --- a/src/plugins/autotest/testcodeparser.cpp +++ b/src/plugins/autotest/testcodeparser.cpp @@ -208,20 +208,15 @@ static void performParse(QFutureInterface &futureInterface, void TestCodeParser::onDocumentUpdated(const QString &fileName) { + if (m_codeModelParsing || m_fullUpdatePostponed) + return; + ProjectExplorer::Project *project = ProjectExplorer::SessionManager::startupProject(); if (!project) return; if (!project->files(ProjectExplorer::Project::SourceFiles).contains(fileName)) return; - if (m_codeModelParsing) { - if (!m_fullUpdatePostponed) { - m_partialUpdatePostponed = true; - m_postponedFiles.insert(fileName); - } - return; - } - scanForTests(QStringList(fileName)); }