From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kirigami/, kde-frameworks/kirigami/files/
Date: Tue, 29 Sep 2020 12:49:29 +0000 (UTC) [thread overview]
Message-ID: <1601383568.262b19e8713abd4fa1fd19c202088af7992d0c15.asturm@gentoo> (raw)
commit: 262b19e8713abd4fa1fd19c202088af7992d0c15
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 29 12:36:54 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Sep 29 12:46:08 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=262b19e8
kde-frameworks/kirigami: Remove actions/delegates from ToolBarLayout
...when they get destroyed. Fixes (at least) a Discover crash.
Upstream commit 6eaefba5001445fa7e198e4caa0bde738240d66f
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=425670
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...actions-from-ToolBarLayout-when-destroyed.patch | 40 ++++++++++++++++++++++
kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild | 5 ++-
2 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/kde-frameworks/kirigami/files/kirigami-5.74.0-remove-actions-from-ToolBarLayout-when-destroyed.patch b/kde-frameworks/kirigami/files/kirigami-5.74.0-remove-actions-from-ToolBarLayout-when-destroyed.patch
new file mode 100644
index 00000000000..192ba9dcf67
--- /dev/null
+++ b/kde-frameworks/kirigami/files/kirigami-5.74.0-remove-actions-from-ToolBarLayout-when-destroyed.patch
@@ -0,0 +1,40 @@
+From 6eaefba5001445fa7e198e4caa0bde738240d66f Mon Sep 17 00:00:00 2001
+From: Arjen Hiemstra <ahiemstra@heimr.nl>
+Date: Wed, 9 Sep 2020 13:00:59 +0200
+Subject: [PATCH] Remove actions and delegates from ToolBarLayout when they get
+ destroyed
+
+Otherwise we're keeping around stale entries that no longer point to
+valid stuff.
+
+BUG: 425670
+---
+ src/toolbarlayout.cpp | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/toolbarlayout.cpp b/src/toolbarlayout.cpp
+index cbf31062..c2df5998 100644
+--- a/src/toolbarlayout.cpp
++++ b/src/toolbarlayout.cpp
+@@ -112,6 +112,18 @@ void ToolBarLayout::addAction(QObject* action)
+ d->actions.append(action);
+ d->actionsChanged = true;
+
++ connect(action, &QObject::destroyed, this, [this](QObject *action) {
++ auto itr = d->delegates.find(action);
++ if (itr != d->delegates.end()) {
++ d->delegates.erase(itr);
++ }
++
++ d->actions.removeOne(action);
++ d->actionsChanged = true;
++
++ relayout();
++ });
++
+ relayout();
+ }
+
+--
+GitLab
+
diff --git a/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild b/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild
index aa5b71a3f17..0064f84f415 100644
--- a/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild
+++ b/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild
@@ -37,7 +37,10 @@ RDEPEND="${DEPEND}
# requires package to already be installed
RESTRICT+=" test"
-PATCHES=( "${FILESDIR}"/${P}-revert-fix-avatar-loading.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-revert-fix-avatar-loading.patch
+ "${FILESDIR}"/${P}-remove-actions-from-ToolBarLayout-when-destroyed.patch
+)
src_configure() {
local mycmakeargs=(
next reply other threads:[~2020-09-29 12:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 12:49 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-04-09 16:07 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kirigami/, kde-frameworks/kirigami/files/ Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
2019-11-20 15:45 Andreas Sturmlechner
2019-11-20 12:22 Andreas Sturmlechner
2017-11-04 0:14 Michael Palimaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1601383568.262b19e8713abd4fa1fd19c202088af7992d0c15.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox