From 1c61de1990a734269e5b0a076fdc238bee00f037 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 20 Aug 2020 11:53:33 +0300 Subject: [PATCH] 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. --- autotests/integration/test_helpers.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index 72c205b6ee..769b103291 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -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);