void-packages/srcpkgs/libplasma/patches/BUG-481113.patch
Đoàn Trần Công Danh 88cf819157 libplasma: backport BUG-481113
See: #50764
2024-06-18 07:15:50 +07:00

40 lines
1.5 KiB
Diff

From 3bc199d92402e316541d6dec00af9fee66afc341 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Sat, 8 Jun 2024 13:37:22 +0300
Subject: [PATCH] Applet: run full Applet::save when a config value changes
Plasma had two timers for configuration saving:
- One applet specific, which eventually calls Applet::save
- One at a corona level, which eventually calls KConfig::save
The former was incorrectly removed because it wasn't hooked up to
anything useful, but the real bug is that it should have been.
When a value changes in the KConfigPropertyMap we need to run through
Applet::save to sync that config loader with our main config. This
implicitly emits the configNeedsSaving which will trigger corona to sync
to disk.
BUG: 481113
---
src/plasma/applet.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/plasma/applet.cpp b/src/plasma/applet.cpp
index 0e964d7fa9..33b378d6f3 100644
--- a/src/plasma/applet.cpp
+++ b/src/plasma/applet.cpp
@@ -262,7 +262,9 @@ KConfigPropertyMap *Applet::configuration()
{
if (!d->configPropertyMap) {
d->configPropertyMap = new KConfigPropertyMap(configScheme(), this);
- connect(d->configPropertyMap, &KConfigPropertyMap::valueChanged, this, &Applet::configNeedsSaving);
+ connect(d->configPropertyMap, &KConfigPropertyMap::valueChanged, this, [this]() {
+ d->scheduleModificationNotification();
+ });
}
return d->configPropertyMap;
}
--
GitLab