1 |
commit: 074f26d812887c6ca707ee9909361c5d8aa3cb4b |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 27 12:22:01 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 27 14:45:49 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=074f26d8 |
7 |
|
8 |
kde-frameworks/kglobalaccel: Bump for another crash fix |
9 |
|
10 |
Package-Manager: Portage-2.3.65, Repoman-2.3.12 |
11 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
12 |
|
13 |
.../kglobalaccel-5.57.0-runtime-crashfix1.patch | 47 ++++++++++++++++++++++ |
14 |
.../kglobalaccel/kglobalaccel-5.57.0-r2.ebuild | 32 +++++++++++++++ |
15 |
2 files changed, 79 insertions(+) |
16 |
|
17 |
diff --git a/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..68a76d5f00e |
20 |
--- /dev/null |
21 |
+++ b/kde-frameworks/kglobalaccel/files/kglobalaccel-5.57.0-runtime-crashfix1.patch |
22 |
@@ -0,0 +1,47 @@ |
23 |
+From 78a711361db3a5156f511eab89ff7ebbc86b9125 Mon Sep 17 00:00:00 2001 |
24 |
+From: Fabian Vogt <fabian@×××××××××××.de> |
25 |
+Date: Thu, 18 Apr 2019 14:32:11 +0200 |
26 |
+Subject: Copy container in Component::cleanUp before interating |
27 |
+ |
28 |
+Summary: |
29 |
+Crash was reported: |
30 |
+ |
31 |
+Thread 1 (Thread 0x7fdc95c68800 (LWP 6402)): |
32 |
+[KCrash Handler] |
33 |
+#6 QHashData::nextNode (node=node@entry=0x562f53ffbd10) at tools/qhash.cpp:598 |
34 |
+#7 0x00007fdc95a1fbab in QHash<QString, GlobalShortcut*>::const_iterator::operator++ (this=<synthetic pointer>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:395 |
35 |
+#8 KdeDGlobalAccel::Component::cleanUp (this=0x562f53ffb040) at ./src/runtime/component.cpp:163 |
36 |
+ |
37 |
+Apparently the container is modified while iterating over it. That does not work with the range-for as it does not detach, as opposed to Q_FOREACH. |
38 |
+ |
39 |
+Test Plan: @lbeltrame saw valgrind errors before applying this, but those disappeared with this patch. |
40 |
+ |
41 |
+Reviewers: #frameworks, davidedmundson |
42 |
+ |
43 |
+Reviewed By: davidedmundson |
44 |
+ |
45 |
+Subscribers: lbeltrame, kde-frameworks-devel |
46 |
+ |
47 |
+Tags: #frameworks |
48 |
+ |
49 |
+Differential Revision: https://phabricator.kde.org/D20659 |
50 |
+--- |
51 |
+ src/runtime/component.cpp | 5 +++-- |
52 |
+ 1 file changed, 3 insertions(+), 2 deletion(-) |
53 |
+ |
54 |
+diff --git a/src/runtime/component.cpp b/src/runtime/component.cpp |
55 |
+--- b/src/runtime/component.cpp |
56 |
++++ b/src/runtime/component.cpp |
57 |
+@@ -158,9 +158,10 @@ |
58 |
+ |
59 |
+ bool Component::cleanUp() |
60 |
+ { |
61 |
+- bool changed = false;; |
62 |
++ bool changed = false; |
63 |
+ |
64 |
+- for (GlobalShortcut *shortcut : qAsConst(_current->_actions)) |
65 |
++ const auto actions = _current->_actions; |
66 |
++ for (GlobalShortcut *shortcut : actions) |
67 |
+ { |
68 |
+ qCDebug(KGLOBALACCELD) << _current->_actions.size(); |
69 |
+ if (!shortcut->isPresent()) |
70 |
|
71 |
diff --git a/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild |
72 |
new file mode 100644 |
73 |
index 00000000000..06ce9c5c409 |
74 |
--- /dev/null |
75 |
+++ b/kde-frameworks/kglobalaccel/kglobalaccel-5.57.0-r2.ebuild |
76 |
@@ -0,0 +1,32 @@ |
77 |
+# Copyright 1999-2019 Gentoo Authors |
78 |
+# Distributed under the terms of the GNU General Public License v2 |
79 |
+ |
80 |
+EAPI=7 |
81 |
+ |
82 |
+VIRTUALX_REQUIRED="test" |
83 |
+inherit kde5 |
84 |
+ |
85 |
+DESCRIPTION="Framework to handle global shortcuts" |
86 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
87 |
+LICENSE="LGPL-2+" |
88 |
+IUSE="nls" |
89 |
+ |
90 |
+BDEPEND=" |
91 |
+ nls? ( $(add_qt_dep linguist-tools) ) |
92 |
+" |
93 |
+DEPEND=" |
94 |
+ $(add_frameworks_dep kconfig) |
95 |
+ $(add_frameworks_dep kcoreaddons) |
96 |
+ $(add_frameworks_dep kcrash) |
97 |
+ $(add_frameworks_dep kdbusaddons) |
98 |
+ $(add_frameworks_dep kwindowsystem X) |
99 |
+ $(add_qt_dep qtdbus) |
100 |
+ $(add_qt_dep qtgui) |
101 |
+ $(add_qt_dep qtwidgets) |
102 |
+ $(add_qt_dep qtx11extras) |
103 |
+ x11-libs/libxcb |
104 |
+ x11-libs/xcb-util-keysyms |
105 |
+" |
106 |
+RDEPEND="${DEPEND}" |
107 |
+ |
108 |
+PATCHES=( "${FILESDIR}"/${P}-runtime-crashfix{,1}.patch ) |