autotests: Clean up the outputs list when client connection is closed

If the client connection has been closed, the Output::removed() signal
won't be emitted.
This commit is contained in:
Vlad Zahorodnii 2020-08-20 11:53:33 +03:00
parent ed0b0ee925
commit 1c61de1990

View file

@ -118,6 +118,9 @@ bool setupWaylandConnection(AdditionalWaylandInterfaces flags)
output->deleteLater();
s_waylandConnection.outputs.removeOne(output);
});
QObject::connect(output, &Output::destroyed, [=]() {
s_waylandConnection.outputs.removeOne(output);
});
});
QSignalSpy allAnnounced(registry, &Registry::interfacesAnnounced);