Commit ac1c04b6 authored by Christian Stenger's avatar Christian Stenger

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's avatarEike Ziller <eike.ziller@qt.io>
parent 9a3a0fa7
......@@ -208,20 +208,15 @@ static void performParse(QFutureInterface<TestParseResultPtr> &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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment