From fa715b5a80a3586b19c9503f6ea784fadf88fd7963311081c5629a867a27dfcc Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Thu, 28 May 2020 09:59:15 +0000 Subject: [PATCH] Accepting request 809407 from home:wolfi323:branches:KDE:Applications - Add patch to fix a possible crash when closing the window: (boo#1164633, kde#409375) * Disconnect-QtabWidget_currentChanged-signal-on-window-close.patch OBS-URL: https://build.opensuse.org/request/show/809407 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/ksystemlog?expand=0&rev=129 --- ...urrentChanged-signal-on-window-close.patch | 29 +++++++++++++++++++ ksystemlog.changes | 7 +++++ ksystemlog.spec | 3 ++ 3 files changed, 39 insertions(+) create mode 100644 Disconnect-QtabWidget_currentChanged-signal-on-window-close.patch diff --git a/Disconnect-QtabWidget_currentChanged-signal-on-window-close.patch b/Disconnect-QtabWidget_currentChanged-signal-on-window-close.patch new file mode 100644 index 0000000..14c5531 --- /dev/null +++ b/Disconnect-QtabWidget_currentChanged-signal-on-window-close.patch @@ -0,0 +1,29 @@ +From eeab31a116535efc6d4757f027897265736ed161 Mon Sep 17 00:00:00 2001 +From: Wolfgang Bauer +Date: Sun, 17 May 2020 20:22:45 +0000 +Subject: Disconnect `QtabWidget::currentChanged` signal on window close event + +Otherwise `MainWindow::changeCurrentTab()` may still get called when things are already being destroyed, leading to crashes. + +BUG: 409375 +FIXED-IN: 20.04.2 +--- + src/mainWindow.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/mainWindow.cpp b/src/mainWindow.cpp +index 3607f6c..a30449c 100644 +--- a/src/mainWindow.cpp ++++ b/src/mainWindow.cpp +@@ -350,6 +350,8 @@ void MainWindow::updateReloading() + + void MainWindow::closeEvent(QCloseEvent *event) + { ++ disconnect(d->tabs, &QTabWidget::currentChanged, this, &MainWindow::changeCurrentTab); ++ + LogManager *currentLogManager = d->tabs->activeLogManager(); + if (currentLogManager) { + currentLogManager->stopWatching(); +-- +cgit v1.1 + diff --git a/ksystemlog.changes b/ksystemlog.changes index 6fa5846..79bf31c 100644 --- a/ksystemlog.changes +++ b/ksystemlog.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 27 09:56:54 UTC 2020 - Wolfgang Bauer + +- Add patch to fix a possible crash when closing the window: + (boo#1164633, kde#409375) + * Disconnect-QtabWidget_currentChanged-signal-on-window-close.patch + ------------------------------------------------------------------- Fri May 15 15:41:58 UTC 2020 - Luca Beltrame diff --git a/ksystemlog.spec b/ksystemlog.spec index 4c0350c..197dcde 100644 --- a/ksystemlog.spec +++ b/ksystemlog.spec @@ -28,6 +28,8 @@ License: GPL-2.0-only Group: System/Monitoring URL: https://www.kde.org Source: https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM +Patch: Disconnect-QtabWidget_currentChanged-signal-on-window-close.patch BuildRequires: extra-cmake-modules BuildRequires: oxygen5-icon-theme-large BuildRequires: pkgconfig @@ -57,6 +59,7 @@ want to quickly see problems occurring on their server. %prep %setup -q +%autopatch -p1 %build %cmake_kf5 -d build