kde-frameworks/kcmutils: Check activeModule before using it
authorAndreas Sturmlechner <asturm@gentoo.org>
Wed, 19 Feb 2020 10:13:31 +0000 (11:13 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 19 Feb 2020 10:46:15 +0000 (11:46 +0100)
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=417396
Reported-by: Theofilos Intzoglou <int.teo@gmail.com>
Closes: https://bugs.gentoo.org/710078
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
kde-frameworks/kcmutils/files/kcmutils-5.67.0-check-activeModule.patch [new file with mode: 0644]
kde-frameworks/kcmutils/kcmutils-5.67.0-r1.ebuild [new file with mode: 0644]

diff --git a/kde-frameworks/kcmutils/files/kcmutils-5.67.0-check-activeModule.patch b/kde-frameworks/kcmutils/files/kcmutils-5.67.0-check-activeModule.patch
new file mode 100644 (file)
index 0000000..63b4b51
--- /dev/null
@@ -0,0 +1,31 @@
+From ea7120ed901bf6161bb483ab73211a6491daac8f Mon Sep 17 00:00:00 2001
+From: Wolfgang Bauer <wbauer@tmo.at>
+Date: Sun, 16 Feb 2020 18:05:06 +0100
+Subject: Check activeModule before using it
+
+`activeModule` can be a nullptr here, as this is outside/after the
+`if (activeModule)`.
+This causes kontact to crash when opening its settings.
+
+BUG: 417396
+FIXED-IN: 5.68.0
+Differential Revision: https://phabricator.kde.org/D27433
+---
+ src/kcmultidialog.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/kcmultidialog.cpp b/src/kcmultidialog.cpp
+index 90da1c0..6a36ba5 100644
+--- a/src/kcmultidialog.cpp
++++ b/src/kcmultidialog.cpp
+@@ -181,7 +181,7 @@ void KCMultiDialogPrivate::_k_clientChanged()
+ #endif
+     }
+-    auto buttons = activeModule->buttons();
++    auto buttons = activeModule ? activeModule->buttons() : KCModule::NoAdditionalButton;
+     QPushButton *resetButton = q->buttonBox()->button(QDialogButtonBox::Reset);
+     if (resetButton) {
+-- 
+cgit v1.1
diff --git a/kde-frameworks/kcmutils/kcmutils-5.67.0-r1.ebuild b/kde-frameworks/kcmutils/kcmutils-5.67.0-r1.ebuild
new file mode 100644 (file)
index 0000000..302bf05
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_TEST="false"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.12.3
+inherit ecm kde.org
+
+DESCRIPTION="Framework to work with KDE System Settings modules"
+LICENSE="LGPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="
+       =kde-frameworks/kauth-${PVCUT}*:5
+       =kde-frameworks/kconfig-${PVCUT}*:5
+       =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+       =kde-frameworks/kcoreaddons-${PVCUT}*:5
+       =kde-frameworks/kdeclarative-${PVCUT}*:5
+       =kde-frameworks/kguiaddons-${PVCUT}*:5
+       =kde-frameworks/ki18n-${PVCUT}*:5
+       =kde-frameworks/kitemviews-${PVCUT}*:5
+       =kde-frameworks/kservice-${PVCUT}*:5
+       =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+       =kde-frameworks/kxmlgui-${PVCUT}*:5
+       >=dev-qt/qtdbus-${QTMIN}:5
+       >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
+       >=dev-qt/qtgui-${QTMIN}:5
+       >=dev-qt/qtwidgets-${QTMIN}:5
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-check-activeModule.patch" ) # bug 710078, in 5.68