Commit e40bdc90 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

autotests: Simplify tearing down ConnectionThread

It should be enough to call QObject::deleteLater() and wait until the
connection thread stops spinning its event loop.
parent 63258ab0
Pipeline #228861 failed with stage
in 16 minutes and 25 seconds
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment