From e40bdc90169c72b221729c792790d0fb80076a0f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 8 Sep 2022 11:17:36 +0300 Subject: [PATCH] autotests: Simplify tearing down ConnectionThread It should be enough to call QObject::deleteLater() and wait until the connection thread stops spinning its event loop. --- autotests/integration/test_helpers.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index 2788412734..b530e527cf 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -550,11 +550,7 @@ void destroyWaylandConnection() delete s_waylandConnection.outputManagementV2; s_waylandConnection.outputManagementV2 = nullptr; if (s_waylandConnection.thread) { - QSignalSpy spy(s_waylandConnection.connection, &QObject::destroyed); s_waylandConnection.connection->deleteLater(); - if (spy.isEmpty()) { - QVERIFY(spy.wait()); - } s_waylandConnection.thread->quit(); s_waylandConnection.thread->wait(); delete s_waylandConnection.thread;