1 |
commit: 262b19e8713abd4fa1fd19c202088af7992d0c15 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 29 12:36:54 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 29 12:46:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=262b19e8 |
7 |
|
8 |
kde-frameworks/kirigami: Remove actions/delegates from ToolBarLayout |
9 |
|
10 |
...when they get destroyed. Fixes (at least) a Discover crash. |
11 |
|
12 |
Upstream commit 6eaefba5001445fa7e198e4caa0bde738240d66f |
13 |
|
14 |
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=425670 |
15 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
...actions-from-ToolBarLayout-when-destroyed.patch | 40 ++++++++++++++++++++++ |
19 |
kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild | 5 ++- |
20 |
2 files changed, 44 insertions(+), 1 deletion(-) |
21 |
|
22 |
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 |
23 |
new file mode 100644 |
24 |
index 00000000000..192ba9dcf67 |
25 |
--- /dev/null |
26 |
+++ b/kde-frameworks/kirigami/files/kirigami-5.74.0-remove-actions-from-ToolBarLayout-when-destroyed.patch |
27 |
@@ -0,0 +1,40 @@ |
28 |
+From 6eaefba5001445fa7e198e4caa0bde738240d66f Mon Sep 17 00:00:00 2001 |
29 |
+From: Arjen Hiemstra <ahiemstra@×××××.nl> |
30 |
+Date: Wed, 9 Sep 2020 13:00:59 +0200 |
31 |
+Subject: [PATCH] Remove actions and delegates from ToolBarLayout when they get |
32 |
+ destroyed |
33 |
+ |
34 |
+Otherwise we're keeping around stale entries that no longer point to |
35 |
+valid stuff. |
36 |
+ |
37 |
+BUG: 425670 |
38 |
+--- |
39 |
+ src/toolbarlayout.cpp | 12 ++++++++++++ |
40 |
+ 1 file changed, 12 insertions(+) |
41 |
+ |
42 |
+diff --git a/src/toolbarlayout.cpp b/src/toolbarlayout.cpp |
43 |
+index cbf31062..c2df5998 100644 |
44 |
+--- a/src/toolbarlayout.cpp |
45 |
++++ b/src/toolbarlayout.cpp |
46 |
+@@ -112,6 +112,18 @@ void ToolBarLayout::addAction(QObject* action) |
47 |
+ d->actions.append(action); |
48 |
+ d->actionsChanged = true; |
49 |
+ |
50 |
++ connect(action, &QObject::destroyed, this, [this](QObject *action) { |
51 |
++ auto itr = d->delegates.find(action); |
52 |
++ if (itr != d->delegates.end()) { |
53 |
++ d->delegates.erase(itr); |
54 |
++ } |
55 |
++ |
56 |
++ d->actions.removeOne(action); |
57 |
++ d->actionsChanged = true; |
58 |
++ |
59 |
++ relayout(); |
60 |
++ }); |
61 |
++ |
62 |
+ relayout(); |
63 |
+ } |
64 |
+ |
65 |
+-- |
66 |
+GitLab |
67 |
+ |
68 |
|
69 |
diff --git a/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild b/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild |
70 |
index aa5b71a3f17..0064f84f415 100644 |
71 |
--- a/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild |
72 |
+++ b/kde-frameworks/kirigami/kirigami-5.74.0-r1.ebuild |
73 |
@@ -37,7 +37,10 @@ RDEPEND="${DEPEND} |
74 |
# requires package to already be installed |
75 |
RESTRICT+=" test" |
76 |
|
77 |
-PATCHES=( "${FILESDIR}"/${P}-revert-fix-avatar-loading.patch ) |
78 |
+PATCHES=( |
79 |
+ "${FILESDIR}"/${P}-revert-fix-avatar-loading.patch |
80 |
+ "${FILESDIR}"/${P}-remove-actions-from-ToolBarLayout-when-destroyed.patch |
81 |
+) |
82 |
|
83 |
src_configure() { |
84 |
local mycmakeargs=( |