AutoTest: Cancel current parse if we start a full parse

Change-Id: I55dd45c1f39abf1540ec668dd17f878c85c06253
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Christian Stenger
2016-04-15 07:32:20 +02:00
parent 63eb9f7a2e
commit b4b1c50b7a

View File

@@ -585,6 +585,8 @@ static void performParse(QFutureInterface<TestParseResult> &futureInterface,
QmlJS::Snapshot qmlSnapshot = QmlJSTools::Internal::ModelManager::instance()->snapshot();
foreach (const QString &file, list) {
if (futureInterface.isCanceled())
return;
if (file.endsWith(QLatin1String(".qml"))) {
checkQmlDocumentForTestCode(futureInterface, qmlSnapshot.document(file));
} else if (snapshot.contains(file)) {
@@ -674,6 +676,7 @@ bool TestCodeParser::postponed(const QStringList &fileList)
m_partialUpdatePostponed = false;
m_postponedFiles.clear();
m_fullUpdatePostponed = true;
Core::ProgressManager::instance()->cancelTasks(Constants::TASK_PARSE);
} else {
// partial parse triggered, but full parse is postponed already, ignoring this
if (m_fullUpdatePostponed)