From 88cf819157598ddc5444a4c44d4666548c4c7b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 18 Jun 2024 06:27:42 +0700 Subject: [PATCH] libplasma: backport BUG-481113 See: #50764 --- srcpkgs/libplasma/patches/BUG-481113.patch | 40 ++++++++++++++++++++++ srcpkgs/libplasma/template | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/libplasma/patches/BUG-481113.patch diff --git a/srcpkgs/libplasma/patches/BUG-481113.patch b/srcpkgs/libplasma/patches/BUG-481113.patch new file mode 100644 index 00000000000..46dc70ba0c6 --- /dev/null +++ b/srcpkgs/libplasma/patches/BUG-481113.patch @@ -0,0 +1,40 @@ +From 3bc199d92402e316541d6dec00af9fee66afc341 Mon Sep 17 00:00:00 2001 +From: David Edmundson +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 + diff --git a/srcpkgs/libplasma/template b/srcpkgs/libplasma/template index a3e6c64dea9..1c4430538e2 100644 --- a/srcpkgs/libplasma/template +++ b/srcpkgs/libplasma/template @@ -1,7 +1,7 @@ # Template file for 'libplasma' pkgname=libplasma version=6.0.5 -revision=1 +revision=2 build_style=cmake configure_args="-DKF6_HOST_TOOLING=/usr/lib/cmake -DKDE_INSTALL_QMLDIR=lib/qt6/qml