From 445289d16839ab37e42c67ad7f4f650603dc1f24 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 22 Apr 2021 17:31:26 +0200 Subject: [PATCH] Fix leak in test Unregister an interface when we're done with it. This also ensures we don't have several running in parallel as well. --- src/wayland/autotests/client/test_wayland_output.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/autotests/client/test_wayland_output.cpp b/src/wayland/autotests/client/test_wayland_output.cpp index ab884ffe0a..ef93cbbd9c 100644 --- a/src/wayland/autotests/client/test_wayland_output.cpp +++ b/src/wayland/autotests/client/test_wayland_output.cpp @@ -410,7 +410,7 @@ void TestWaylandOutput::testDpms() using namespace KWayland::Client; using namespace KWaylandServer; - new DpmsManagerInterface(m_display); + DpmsManagerInterface iface(m_display); // set Dpms on the Output QSignalSpy serverDpmsSupportedChangedSpy(m_serverOutput, &OutputInterface::dpmsSupportedChanged); @@ -505,7 +505,7 @@ void TestWaylandOutput::testDpmsRequestMode() using namespace KWaylandServer; // setup code - new DpmsManagerInterface(m_display); + DpmsManagerInterface iface(m_display); // set Dpms on the Output QSignalSpy serverDpmsSupportedChangedSpy(m_serverOutput, &OutputInterface::dpmsSupportedChanged);