AutoTest: Limit purging of test tree to project switching

Instead of purging the current test tree on all full parses, just
purge the whole tree if the user switches the current project.
If an item can no more be found after the full parse it gets
removed anyhow.
This avoids losing the check state on any full-parse.

Change-Id: Ia7bae6ced65a69444adf0d7e2a554d90ddd5caa4
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2016-12-02 09:05:46 +01:00
parent 2275d68373
commit 349ad040d6

View File

@@ -155,8 +155,6 @@ void TestCodeParser::updateTestTree()
return;
m_fullUpdatePostponed = false;
emit aboutToPerformFullParse();
qCDebug(LOG) << "calling scanForTests (updateTestTree)";
scanForTests();
}
@@ -199,6 +197,7 @@ void TestCodeParser::onStartupProjectChanged(ProjectExplorer::Project *project)
qCDebug(LOG) << "Canceling scanForTest (startup project changed)";
Core::ProgressManager::instance()->cancelTasks(Constants::TASK_PARSE);
}
emit aboutToPerformFullParse();
if (project)
emitUpdateTestTree();
}