From 77d10f3633eb2210b465397fd3a29c77846c00a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Thu, 11 Dec 2014 12:19:57 +0100 Subject: Async: simplify the template magic around In... being empty or void --- async/autotests/asynctest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'async/autotests') 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() [&]() { future.setValue(42); future.setFinished(); - timer->deleteLater(); }); + QObject::connect(timer, &QTimer::timeout, + timer, &QObject::deleteLater); timer->setSingleShot(true); timer->start(200); return future; -- cgit v1.2.3