summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-frameworks/kidletime')
-rw-r--r--kde-frameworks/kidletime/Manifest4
-rw-r--r--kde-frameworks/kidletime/files/kidletime-5.92.0-crashfix.patch41
-rw-r--r--kde-frameworks/kidletime/kidletime-5.92.0-r1.ebuild (renamed from kde-frameworks/kidletime/kidletime-5.88.0.ebuild)4
-rw-r--r--kde-frameworks/kidletime/kidletime-5.94.0.ebuild (renamed from kde-frameworks/kidletime/kidletime-5.90.0.ebuild)2
4 files changed, 47 insertions, 4 deletions
diff --git a/kde-frameworks/kidletime/Manifest b/kde-frameworks/kidletime/Manifest
index bd335d102af..4371398d914 100644
--- a/kde-frameworks/kidletime/Manifest
+++ b/kde-frameworks/kidletime/Manifest
@@ -1,2 +1,2 @@
-DIST kidletime-5.88.0.tar.xz 26540 BLAKE2B ec4f7cbc48c08235a3d8fd1f07150b4440e15d1eafa094294100cce84938562f37d9d516791e2aacf1e2d0eca0ad00eb571cd552c7399b710fce6d38ccaa74f9 SHA512 542988271641752dc2766855b5d05ec591c130dd0714f0bda8874dcfc0c016a14432013bf333d96c0c35a3d53ea43c59cda2663f52dc52487bcb58a62280f774
-DIST kidletime-5.90.0.tar.xz 28888 BLAKE2B e48d99bcd3777352e229cfd62e7127a9bc6a10a5978ed9c5ffdbd866c164876faccb0b0a8a16ccefae9aa52080d21dfbf1c2a0ea7a358c4d8dcde97ff0a14d8c SHA512 ff1aa1d2fe9d7eae4e45b64fec01065da845c78c43136549c9b9b292a89bd05bce91369939886888320ddd6bf3e060b27edf0921ca5e2f3ae7b8f23577d7908a
+DIST kidletime-5.92.0.tar.xz 29072 BLAKE2B 7c1ab01005400b9034693c0099df980b20806a8ee5c225fcd9e3a761ea587cbfa98c52f9efdd5762ba93c9999deb5026ed189c3267369c8a04ec9a36fd20c763 SHA512 58d9c2ef675d0e3092cda43f14ea0cc51105412a0b19828659f0e4eb386870675bf9f8765327777aa7829ae29c878a63cfe7a00954c09315c0d4840eca8313ec
+DIST kidletime-5.94.0.tar.xz 29104 BLAKE2B 7af9960da627b9fcd8b7d963b58eae8df1aeebafd212bc221662c850023ad243f10ec4c30b63653787400e3899fa1266e3784fb87bd6931e4545f8a03b06665d SHA512 121d6684b699f1319979d4736e45d20a66f2e21211d66c35f9dfec32487cc1eb50d9704725ea7016023966375d45911f5417eecd3c9f3c970ee86e4ca5aa9ef1
diff --git a/kde-frameworks/kidletime/files/kidletime-5.92.0-crashfix.patch b/kde-frameworks/kidletime/files/kidletime-5.92.0-crashfix.patch
new file mode 100644
index 00000000000..93a016d76fd
--- /dev/null
+++ b/kde-frameworks/kidletime/files/kidletime-5.92.0-crashfix.patch
@@ -0,0 +1,41 @@
+From cd5040684723b87c7ba5b7cc1b1a63402902a641 Mon Sep 17 00:00:00 2001
+From: Ada Christine <adachristine18@gmail.com>
+Date: Sun, 27 Mar 2022 01:29:09 +0000
+Subject: [PATCH] Fixed crash during KIdleTime::timeoutReached()
+
+timeoutReached() will cause a crash if an item is removed from associations
+during signal dispatch due to iterator invalidation. iterate over a
+const container of the assoication keys only triggering ones matching
+the current timeout value to avoid the crash and unnecessary copying
+
+BUG: 451946
+---
+ src/kidletime.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/kidletime.cpp b/src/kidletime.cpp
+index a58eaa6..0929285 100644
+--- a/src/kidletime.cpp
++++ b/src/kidletime.cpp
+@@ -288,13 +288,13 @@ void KIdleTimePrivate::timeoutReached(int msec)
+ {
+ Q_Q(KIdleTime);
+
+- for (auto it = associations.cbegin(); it != associations.cend(); ++it) {
+- if (it.value() == msec) {
++ const auto listKeys = associations.keys(msec);
++
++ for (const auto key : listKeys) {
+ #if KIDLETIME_BUILD_DEPRECATED_SINCE(5, 76)
+- Q_EMIT q->timeoutReached(it.key());
++ Q_EMIT q->timeoutReached(key);
+ #endif
+- Q_EMIT q->timeoutReached(it.key(), msec);
+- }
++ Q_EMIT q->timeoutReached(key, msec);
+ }
+ }
+
+--
+GitLab
+
diff --git a/kde-frameworks/kidletime/kidletime-5.88.0.ebuild b/kde-frameworks/kidletime/kidletime-5.92.0-r1.ebuild
index 758bef477d9..df968499dec 100644
--- a/kde-frameworks/kidletime/kidletime-5.88.0.ebuild
+++ b/kde-frameworks/kidletime/kidletime-5.92.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -29,6 +29,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${P}-crashfix.patch" ) # KDE-bug 451946
+
src_prepare() {
ecm_src_prepare
if ! use xscreensaver; then
diff --git a/kde-frameworks/kidletime/kidletime-5.90.0.ebuild b/kde-frameworks/kidletime/kidletime-5.94.0.ebuild
index 5d38376e94b..bc446672bd4 100644
--- a/kde-frameworks/kidletime/kidletime-5.90.0.ebuild
+++ b/kde-frameworks/kidletime/kidletime-5.94.0.ebuild
@@ -4,7 +4,7 @@
EAPI=8
ECM_TEST="false"
-QTMIN=5.15.2
+QTMIN=5.15.3
inherit ecm kde.org
DESCRIPTION="Framework for detection and notification of device idle time"