From 2ba1eeb8d41662dbe61c0ea9c05bc66c2ada39d0 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Mon, 18 Aug 2025 16:56:07 +0000 Subject: [PATCH] mobileshellstate: Fix memory leak --- components/mobileshellstate/shelldbusclient.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/mobileshellstate/shelldbusclient.cpp b/components/mobileshellstate/shelldbusclient.cpp index ed860288..28a94ab1 100644 --- a/components/mobileshellstate/shelldbusclient.cpp +++ b/components/mobileshellstate/shelldbusclient.cpp @@ -175,6 +175,8 @@ void ShellDBusClient::updatePanelState() m_panelState = panelState; Q_EMIT panelStateChanged(); } + + watcher->deleteLater(); }); } @@ -191,6 +193,8 @@ void ShellDBusClient::updateDoNotDisturb() m_doNotDisturb = doNotDisturb; Q_EMIT doNotDisturbChanged(); } + + watcher->deleteLater(); }); } @@ -207,6 +211,8 @@ void ShellDBusClient::updateIsActionDrawerOpen() m_isActionDrawerOpen = isActionDrawerOpen; Q_EMIT isActionDrawerOpenChanged(); } + + watcher->deleteLater(); }); } @@ -223,6 +229,8 @@ void ShellDBusClient::updateIsVolumeOSDOpen() m_isVolumeOSDOpen = isVolumeOSDOpen; Q_EMIT isVolumeOSDOpenChanged(); } + + watcher->deleteLater(); }); } @@ -239,6 +247,8 @@ void ShellDBusClient::updateIsNotificationPopupDrawerOpen() m_isNotificationPopupDrawerOpen = isNotificationPopupDrawerOpen; Q_EMIT isNotificationPopupDrawerOpenChanged(); } + + watcher->deleteLater(); }); } @@ -255,5 +265,7 @@ void ShellDBusClient::updateIsTaskSwitcherVisible() m_isTaskSwitcherVisible = isTaskSwitcherVisible; Q_EMIT isTaskSwitcherVisibleChanged(); } + + watcher->deleteLater(); }); }