summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-10 14:12:33 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-14 14:52:08 +0200
commitcd787dbac9e789e63d81f8ab7241ca734faffb44 (patch)
tree4e65df342fa0b5a80d6980ade19074a21583d1a0 /tests
parent97741a959026816071e8c6a4ac8e0a660aa08454 (diff)
QtConcurrent: Get rid of multi-inheritance inside RunFunctionTaskBase
Use aggregation instead. Prepare for using QPromise instead of QFutureInterface. Task-number: QTBUG-84702 Change-Id: Ic88564dca8c83a178a281cb843032292210a6d25 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
index d4f609874e..63277b02df 100644
--- a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
+++ b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp
@@ -457,9 +457,9 @@ class ProgressEmitterTask : public RunFunctionTask<void>
public:
void runFunctor()
{
- setProgressRange(0, maxProgress);
+ promise.setProgressRange(0, maxProgress);
for (int p = 0; p <= maxProgress; ++p)
- setProgressValue(p);
+ promise.setProgressValue(p);
}
};
@@ -487,19 +487,19 @@ class ProgressTextTask : public RunFunctionTask<T>
public:
void runFunctor()
{
- this->setProgressValueAndText(1, QLatin1String("Foo 1"));
+ this->promise.setProgressValueAndText(1, QLatin1String("Foo 1"));
- while (this->isProgressUpdateNeeded() == false)
+ while (this->promise.isProgressUpdateNeeded() == false)
QTest::qSleep(1);
- this->setProgressValueAndText(2, QLatin1String("Foo 2"));
+ this->promise.setProgressValueAndText(2, QLatin1String("Foo 2"));
- while (this->isProgressUpdateNeeded() == false)
+ while (this->promise.isProgressUpdateNeeded() == false)
QTest::qSleep(1);
- this->setProgressValueAndText(3, QLatin1String("Foo 3"));
+ this->promise.setProgressValueAndText(3, QLatin1String("Foo 3"));
- while (this->isProgressUpdateNeeded() == false)
+ while (this->promise.isProgressUpdateNeeded() == false)
QTest::qSleep(1);
- this->setProgressValueAndText(4, QLatin1String("Foo 4"));
+ this->promise.setProgressValueAndText(4, QLatin1String("Foo 4"));
}
};