autotests: Simplify tearing down ConnectionThread
It should be enough to call QObject::deleteLater() and wait until the connection thread stops spinning its event loop.
This commit is contained in:
parent
63258ab076
commit
e40bdc9016
1 changed files with 0 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue