summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kde/build/konsole1
-rw-r--r--kde/patch/konsole.patch7
-rw-r--r--kde/patch/konsole/konsole.konsolepart.segfault.closing.after.contextmenu.patch43
-rw-r--r--kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch58
4 files changed, 109 insertions, 0 deletions
diff --git a/kde/build/konsole b/kde/build/konsole
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/kde/build/konsole
@@ -0,0 +1 @@
+2
diff --git a/kde/patch/konsole.patch b/kde/patch/konsole.patch
index 36e64e6..793d5b1 100644
--- a/kde/patch/konsole.patch
+++ b/kde/patch/konsole.patch
@@ -7,3 +7,10 @@
# (fixed post 18.12.3):
#cat $CWD/patch/konsole/konsole.cursor.antialias.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# Fix crash when closing session in KonsolePart via menu:
+# (fixed in 20.08.0)
+cat $CWD/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix konsolepart segfault when closing after showing context menu:
+# (fixed in 20.08.0)
+cat $CWD/patch/konsole/konsole.konsolepart.segfault.closing.after.contextmenu.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/kde/patch/konsole/konsole.konsolepart.segfault.closing.after.contextmenu.patch b/kde/patch/konsole/konsole.konsolepart.segfault.closing.after.contextmenu.patch
new file mode 100644
index 0000000..fcdbb84
--- /dev/null
+++ b/kde/patch/konsole/konsole.konsolepart.segfault.closing.after.contextmenu.patch
@@ -0,0 +1,43 @@
+From 1d7142ed24ef370ae984c0441d5b325b42656bd7 Mon Sep 17 00:00:00 2001
+From: Maximilian Schiller <manimax3@outlook.de>
+Date: Fri, 29 May 2020 07:36:02 -0400
+Subject: Fix konsolepart segfault when closing after showing context menu
+
+Assign the _view as the parent to the KXMLGuiFactory because the
+factory is referencing the view widget as its associated widget. Since
+the TerminalDisplay gets destructed first this is now a dangling
+pointer. If the view is set as the parent the factory gets cleaned up
+correctly. Also cleanup the created clientBuilder after destruction
+because it can't have a parent and would probably leak memory.
+
+BUG: 415762
+FIXED-IN: 20.08.0
+See also !87
+---
+ src/SessionController.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/SessionController.cpp b/src/SessionController.cpp
+index e72f342..542955d 100644
+--- a/src/SessionController.cpp
++++ b/src/SessionController.cpp
+@@ -1732,11 +1732,13 @@ void SessionController::showDisplayContextMenu(const QPoint& position)
+ if (factory() == nullptr) {
+ if (clientBuilder() == nullptr) {
+ setClientBuilder(new KXMLGUIBuilder(_view));
++
++ // Client builder does not get deleted automatically
++ connect(this, &QObject::destroyed, this, [this]{ delete clientBuilder(); });
+ }
+
+- auto factory = new KXMLGUIFactory(clientBuilder(), this);
++ auto factory = new KXMLGUIFactory(clientBuilder(), _view);
+ factory->addClient(this);
+- ////qDebug() << "Created xmlgui factory" << factory;
+ }
+
+ QPointer<QMenu> popup = qobject_cast<QMenu*>(factory()->container(QStringLiteral("session-popup-menu"), this));
+--
+cgit v1.1
+
+
diff --git a/kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch b/kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch
new file mode 100644
index 0000000..914031b
--- /dev/null
+++ b/kde/patch/konsole/konsole.konsolepart.segfault.closing.session.via.menu.patch
@@ -0,0 +1,58 @@
+From fdfae25665731882687da8721e58c3c56a3babf8 Mon Sep 17 00:00:00 2001
+From: Nicolas Fella <nicolas.fella@gmx.de>
+Date: Thu, 28 May 2020 09:28:06 -0400
+Subject: Fix crash when closing session in KonsolePart via menu
+
+This close method is also used when closing a Konsole session
+via the X on the tabbar and tabheader.
+
+FIXED-IN: 20.08.0
+BUG: 420817
+BUG: 420695
+BUG: 415762
+
+See merge request !87
+---
+ src/SessionController.cpp | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/src/SessionController.cpp b/src/SessionController.cpp
+index 006ba8b..e72f342 100644
+--- a/src/SessionController.cpp
++++ b/src/SessionController.cpp
+@@ -999,16 +999,23 @@ void SessionController::closeSession()
+ return;
+ }
+
+- if (confirmClose()) {
+- if (_session->closeInNormalWay()) {
++ if (!confirmClose()) {
++ return;
++ }
++
++ if (!_session->closeInNormalWay()) {
++ if (!confirmForceClose()) {
+ return;
+- } else if (confirmForceClose()) {
+- if (_session->closeInForceWay()) {
+- return;
+- } else {
+- qCDebug(KonsoleDebug) << "Konsole failed to close a session in any way.";
+- }
+ }
++
++ if (!_session->closeInForceWay()) {
++ qCDebug(KonsoleDebug) << "Konsole failed to close a session in any way.";
++ return;
++ }
++ }
++
++ if (factory()) {
++ factory()->removeClient(this);
+ }
+ }
+
+--
+cgit v1.1
+
+