forked from qt-creator/qt-creator
Autotest: Use QPromise for async calls
Change-Id: I57d2feed36eeb1871b2b00cf7720c48f6a0e81b5 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -91,7 +91,7 @@ static bool hasCatchNames(const CPlusPlus::Document::Ptr &document)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CatchTestParser::processDocument(QFutureInterface<TestParseResultPtr> &futureInterface,
|
||||
bool CatchTestParser::processDocument(QPromise<TestParseResultPtr> &promise,
|
||||
const FilePath &fileName)
|
||||
{
|
||||
CPlusPlus::Document::Ptr doc = document(fileName);
|
||||
@@ -144,7 +144,7 @@ bool CatchTestParser::processDocument(QFutureInterface<TestParseResultPtr> &futu
|
||||
parseResult->children.append(testCase);
|
||||
}
|
||||
|
||||
futureInterface.reportResult(TestParseResultPtr(parseResult));
|
||||
promise.addResult(TestParseResultPtr(parseResult));
|
||||
|
||||
return !foundTests.isEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user