Hello community, here is the log from the commit of package konsole for openSUSE:Leap:15.2 checked in at 2020-06-11 16:18:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/konsole (Old) and /work/SRC/openSUSE:Leap:15.2/.konsole.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "konsole" Thu Jun 11 16:18:00 2020 rev:69 rq:810454 version:20.04.1 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/konsole/konsole.changes 2020-05-24 18:07:46.553990573 +0200 +++ /work/SRC/openSUSE:Leap:15.2/.konsole.new.3606/konsole.changes 2020-06-11 16:18:06.118759278 +0200 @@ -1,0 +2,8 @@ +Fri May 29 12:52:40 UTC 2020 - Wolfgang Bauer <[email protected]> + +- Add upstream patches to fix possible crash when closing a session + in KonsolePart (boo#1169408, kde#420817, kde#420695, kde#415762): + * Fix-crash-when-closing-session-in-KonsolePart-via-menu.patch + * Fix-konsolepart-segfault-when-closing-after-showing-context-menu.patch + +------------------------------------------------------------------- New: ---- Fix-crash-when-closing-session-in-KonsolePart-via-menu.patch Fix-konsolepart-segfault-when-closing-after-showing-context-menu.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ konsole.spec ++++++ --- /var/tmp/diff_new_pack.0S1nWr/_old 2020-06-11 16:18:06.582760480 +0200 +++ /var/tmp/diff_new_pack.0S1nWr/_new 2020-06-11 16:18:06.586760490 +0200 @@ -36,6 +36,10 @@ Source24: utilities-terminal-su-48.png Source25: utilities-terminal-su-64.png Source26: utilities-terminal-su-128.png +# PATCH-FIX-UPSTREAM +Patch: Fix-crash-when-closing-session-in-KonsolePart-via-menu.patch +# PATCH-FIX-UPSTREAM +Patch1: Fix-konsolepart-segfault-when-closing-after-showing-context-menu.patch BuildRequires: fdupes BuildRequires: kf5-filesystem BuildRequires: update-desktop-files @@ -109,6 +113,7 @@ %prep %setup -q +%autopatch -p1 %build %cmake_kf5 -d build ++++++ Fix-crash-when-closing-session-in-KonsolePart-via-menu.patch ++++++ >From 76f3764b47985f5fe50532d46b2e043ba8e31e4a Mon Sep 17 00:00:00 2001 From: Nicolas Fella <[email protected]> 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 (cherry picked from commit fdfae25665731882687da8721e58c3c56a3babf8) --- src/SessionController.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index 293d021..df28e40 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -972,16 +972,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 ++++++ Fix-konsolepart-segfault-when-closing-after-showing-context-menu.patch ++++++ >From d40e3c72f2ad9262d6028bc62bc2837067b824a0 Mon Sep 17 00:00:00 2001 From: Maximilian Schiller <[email protected]> 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 (cherry picked from commit 1d7142ed24ef370ae984c0441d5b325b42656bd7) --- src/SessionController.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index df28e40..41b2a7c 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -1687,11 +1687,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
