File 0001-applets-systemtray-disconnect-KConfigLoader-signal-w.patch of Package plasma5-workspace.17560
From b7a148ec05e25a98a7e41c49191d5ffeeacaaf68 Mon Sep 17 00:00:00 2001
From: Fushan Wen <qydwhotmail@gmail.com>
Date: Fri, 13 May 2022 14:43:44 +0800
Subject: [PATCH] applets/systemtray: disconnect KConfigLoader signal when
instance is about to be deleted
When an applet is about to be deleted, it will save its config
automatically, but in this case the system tray doesn't need to load the
config again.
BUG: 453726
(cherry picked from commit 6da91d053b4f142277d60db4a1a17eded9249d11)
---
applets/systemtray/systemtray.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/applets/systemtray/systemtray.cpp b/applets/systemtray/systemtray.cpp
index 3b7f688a6..c63754135 100644
--- a/applets/systemtray/systemtray.cpp
+++ b/applets/systemtray/systemtray.cpp
@@ -24,6 +24,7 @@
#include <KAcceleratorManager>
#include <KActionCollection>
+#include <KConfigLoader>
SystemTray::SystemTray(QObject *parent, const KPluginMetaData &data, const QVariantList &args)
: Plasma::Containment(parent, data, args)
@@ -40,6 +41,8 @@ SystemTray::SystemTray(QObject *parent, const KPluginMetaData &data, const QVari
SystemTray::~SystemTray()
{
+ // When the applet is about to be deleted, delete now to avoid calling loadConfig()
+ delete m_settings;
}
void SystemTray::init()
--
2.36.1