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:
Jarek Kobus
2023-02-12 01:31:47 +01:00
parent 10a97e1f0e
commit 8285c85725
12 changed files with 30 additions and 33 deletions

View File

@@ -9,9 +9,9 @@
#include <cppeditor/cppworkingcopy.h>
#include <qmljs/qmljsdocument.h>
#include <QFutureInterface>
QT_BEGIN_NAMESPACE
template <class T>
class QPromise;
class QRegularExpression;
QT_END_NAMESPACE
@@ -46,7 +46,7 @@ public:
explicit ITestParser(ITestFramework *framework) : m_framework(framework) {}
virtual ~ITestParser() { }
virtual void init(const Utils::FilePaths &filesToParse, bool fullParse) = 0;
virtual bool processDocument(QFutureInterface<TestParseResultPtr> &futureInterface,
virtual bool processDocument(QPromise<TestParseResultPtr> &futureInterface,
const Utils::FilePath &fileName) = 0;
virtual QStringList supportedExtensions() const { return {}; }