1 |
commit: e51f152cde1e609553ca5712df2f7ad9a4e40ca8 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 28 23:20:43 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 28 23:21:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e51f152c |
7 |
|
8 |
kde-apps/konsole: Fix segfault on session close |
9 |
|
10 |
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=415762 |
11 |
Package-Manager: Portage-2.3.100, Repoman-2.3.22 |
12 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
13 |
|
14 |
.../files/konsole-20.04.1-segfault-on-close.patch | 44 ++++++++++++++ |
15 |
kde-apps/konsole/konsole-20.04.1-r2.ebuild | 68 ++++++++++++++++++++++ |
16 |
2 files changed, 112 insertions(+) |
17 |
|
18 |
diff --git a/kde-apps/konsole/files/konsole-20.04.1-segfault-on-close.patch b/kde-apps/konsole/files/konsole-20.04.1-segfault-on-close.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..55213878ad2 |
21 |
--- /dev/null |
22 |
+++ b/kde-apps/konsole/files/konsole-20.04.1-segfault-on-close.patch |
23 |
@@ -0,0 +1,44 @@ |
24 |
+From 5e5129d51fa85036832f1af44ec5b875d426392f Mon Sep 17 00:00:00 2001 |
25 |
+From: Maximilian Schiller <manimax3@×××××××.de> |
26 |
+Date: Thu, 28 May 2020 22:57:29 +0200 |
27 |
+Subject: [PATCH] Fix konsolepart Segfault when closed |
28 |
+ |
29 |
+Assign the _view as the parent to the KXMLGuiFactory because the factory |
30 |
+is referencing the view widget as its associated widget. Since the |
31 |
+TerminalDisplay gets destructed first this is now a dangling pointer. |
32 |
+If the view is set as the parent the factory gets cleaned up correctly. |
33 |
+ |
34 |
+Also cleanup the created clientBuilder after destruction because it |
35 |
+cant have a parent and would probably leak memory. |
36 |
+ |
37 |
+BUG: 415762 |
38 |
+BUG: 421226 |
39 |
+BUG: 421194 |
40 |
+BUG: 421138 |
41 |
+--- |
42 |
+ src/SessionController.cpp | 6 ++++-- |
43 |
+ 1 file changed, 4 insertions(+), 2 deletions(-) |
44 |
+ |
45 |
+diff --git a/src/SessionController.cpp b/src/SessionController.cpp |
46 |
+index e72f342c4..99e185f5e 100644 |
47 |
+--- a/src/SessionController.cpp |
48 |
++++ b/src/SessionController.cpp |
49 |
+@@ -1732,11 +1732,13 @@ void SessionController::showDisplayContextMenu(const QPoint& position) |
50 |
+ if (factory() == nullptr) { |
51 |
+ if (clientBuilder() == nullptr) { |
52 |
+ setClientBuilder(new KXMLGUIBuilder(_view)); |
53 |
++ |
54 |
++ // Client builder does not get delted automatically |
55 |
++ connect(this, &QObject::destroyed, this, [this]{ delete clientBuilder(); }); |
56 |
+ } |
57 |
+ |
58 |
+- auto factory = new KXMLGUIFactory(clientBuilder(), this); |
59 |
++ auto factory = new KXMLGUIFactory(clientBuilder(), _view); |
60 |
+ factory->addClient(this); |
61 |
+- ////qDebug() << "Created xmlgui factory" << factory; |
62 |
+ } |
63 |
+ |
64 |
+ QPointer<QMenu> popup = qobject_cast<QMenu*>(factory()->container(QStringLiteral("session-popup-menu"), this)); |
65 |
+-- |
66 |
+2.26.2 |
67 |
+ |
68 |
|
69 |
diff --git a/kde-apps/konsole/konsole-20.04.1-r2.ebuild b/kde-apps/konsole/konsole-20.04.1-r2.ebuild |
70 |
new file mode 100644 |
71 |
index 00000000000..95fd7ffcee3 |
72 |
--- /dev/null |
73 |
+++ b/kde-apps/konsole/konsole-20.04.1-r2.ebuild |
74 |
@@ -0,0 +1,68 @@ |
75 |
+# Copyright 1999-2020 Gentoo Authors |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+ |
78 |
+EAPI=7 |
79 |
+ |
80 |
+ECM_HANDBOOK="optional" |
81 |
+ECM_TEST="true" |
82 |
+KFMIN=5.70.0 |
83 |
+QTMIN=5.12.3 |
84 |
+VIRTUALX_REQUIRED="test" |
85 |
+inherit ecm kde.org |
86 |
+ |
87 |
+DESCRIPTION="KDE's terminal emulator" |
88 |
+HOMEPAGE="https://kde.org/applications/system/org.kde.konsole |
89 |
+https://konsole.kde.org" |
90 |
+ |
91 |
+LICENSE="GPL-2" # TODO: CHECK |
92 |
+SLOT="5" |
93 |
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" |
94 |
+IUSE="X" |
95 |
+ |
96 |
+DEPEND=" |
97 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
98 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
99 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
100 |
+ >=dev-qt/qtprintsupport-${QTMIN}:5 |
101 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
102 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
103 |
+ >=kde-frameworks/kbookmarks-${KFMIN}:5 |
104 |
+ >=kde-frameworks/kcompletion-${KFMIN}:5 |
105 |
+ >=kde-frameworks/kconfig-${KFMIN}:5 |
106 |
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5 |
107 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
108 |
+ >=kde-frameworks/kcrash-${KFMIN}:5 |
109 |
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5 |
110 |
+ >=kde-frameworks/kguiaddons-${KFMIN}:5 |
111 |
+ >=kde-frameworks/kjobwidgets-${KFMIN}:5 |
112 |
+ >=kde-frameworks/ki18n-${KFMIN}:5 |
113 |
+ >=kde-frameworks/kinit-${KFMIN}:5 |
114 |
+ >=kde-frameworks/kiconthemes-${KFMIN}:5 |
115 |
+ >=kde-frameworks/kio-${KFMIN}:5 |
116 |
+ >=kde-frameworks/knewstuff-${KFMIN}:5 |
117 |
+ >=kde-frameworks/knotifications-${KFMIN}:5 |
118 |
+ >=kde-frameworks/knotifyconfig-${KFMIN}:5 |
119 |
+ >=kde-frameworks/kparts-${KFMIN}:5 |
120 |
+ >=kde-frameworks/kpty-${KFMIN}:5 |
121 |
+ >=kde-frameworks/kservice-${KFMIN}:5 |
122 |
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5 |
123 |
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 |
124 |
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5 |
125 |
+ >=kde-frameworks/kxmlgui-${KFMIN}:5 |
126 |
+ X? ( x11-libs/libX11 ) |
127 |
+" |
128 |
+RDEPEND="${DEPEND}" |
129 |
+ |
130 |
+PATCHES=( |
131 |
+ "${FILESDIR}/${P}-crash-on-close.patch" # bug 723214, in 20.04.2 |
132 |
+ "${FILESDIR}/${P}-qt-5.15-set-text-encoding-crash.patch" # KDE-Bug 419526; pending |
133 |
+ "${FILESDIR}/${P}-segfault-on-close.patch" # KDE-Bug 415762; pending |
134 |
+) |
135 |
+ |
136 |
+src_configure() { |
137 |
+ local mycmakeargs=( |
138 |
+ $(cmake_use_find_package X X11) |
139 |
+ ) |
140 |
+ |
141 |
+ ecm_src_configure |
142 |
+} |