summaryrefslogtreecommitdiffstats
path: root/async/autotests/asynctest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'async/autotests/asynctest.cpp')
-rw-r--r--async/autotests/asynctest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/async/autotests/asynctest.cpp b/async/autotests/asynctest.cpp
index f2a70a4..786ff3c 100644
--- a/async/autotests/asynctest.cpp
+++ b/async/autotests/asynctest.cpp
@@ -80,8 +80,9 @@ void AsyncTest::testAsyncPromises()
80 [&]() { 80 [&]() {
81 future.setValue(42); 81 future.setValue(42);
82 future.setFinished(); 82 future.setFinished();
83 timer->deleteLater();
84 }); 83 });
84 QObject::connect(timer, &QTimer::timeout,
85 timer, &QObject::deleteLater);
85 timer->setSingleShot(true); 86 timer->setSingleShot(true);
86 timer->start(200); 87 timer->start(200);
87 return future; 88 return future;