aboutsummaryrefslogtreecommitdiff
path: root/tests/Task_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Task_test.cpp')
-rw-r--r--tests/Task_test.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/Task_test.cpp b/tests/Task_test.cpp
index b6bd7edf..ef7042a5 100644
--- a/tests/Task_test.cpp
+++ b/tests/Task_test.cpp
@@ -252,16 +252,15 @@ class TaskTest : public QObject {
{
QEventLoop loop;
- auto thread = new BigConcurrentTaskThread;
+ BigConcurrentTaskThread thread{};
- connect(thread, &BigConcurrentTaskThread::finished, &loop, &QEventLoop::quit);
+ connect(&thread, &BigConcurrentTaskThread::finished, &loop, &QEventLoop::quit);
- thread->start();
+ thread.start();
loop.exec();
- QVERIFY(!thread->passed_the_deadline);
- thread->deleteLater();
+ QVERIFY(!thread.passed_the_deadline);
}
};