summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-05-01 19:19:18 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2020-05-01 22:31:33 +0200
commit307511d8ac390a0332969963ba0196673bc7e808 (patch)
treedb39dbdc1c696de2e2cecde9acc341a93d795e9a /kde-misc
parentxfce-base/xfwm4: Bump to 4.14.2 (diff)
downloadgentoo-307511d8ac390a0332969963ba0196673bc7e808.tar.gz
gentoo-307511d8ac390a0332969963ba0196673bc7e808.tar.bz2
gentoo-307511d8ac390a0332969963ba0196673bc7e808.zip
kde-misc/kdiff3: Fix crash when clipboard is not available
Upstream commit 643edc26bcc8f8e083a97e87c2686f62ffd01f31 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=419722 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-misc')
-rw-r--r--kde-misc/kdiff3/files/kdiff3-1.8.2-crash-w-o-clipboard.patch36
-rw-r--r--kde-misc/kdiff3/kdiff3-1.8.2-r1.ebuild41
2 files changed, 77 insertions, 0 deletions
diff --git a/kde-misc/kdiff3/files/kdiff3-1.8.2-crash-w-o-clipboard.patch b/kde-misc/kdiff3/files/kdiff3-1.8.2-crash-w-o-clipboard.patch
new file mode 100644
index 00000000000..b1d00a12f47
--- /dev/null
+++ b/kde-misc/kdiff3/files/kdiff3-1.8.2-crash-w-o-clipboard.patch
@@ -0,0 +1,36 @@
+From 643edc26bcc8f8e083a97e87c2686f62ffd01f31 Mon Sep 17 00:00:00 2001
+From: Christoph Feck <cfeck@kde.org>
+Date: Thu, 30 Apr 2020 18:27:58 -0400
+Subject: Fix crash when clipboard is not available
+
+Summary:
+QClipboard::mimeData() can be nullptr according to documentation.
+
+BUG: 419722
+FIXED-IN: 1.8.3
+
+Reviewers: mreeves
+
+Reviewed By: mreeves
+
+Differential Revision: https://phabricator.kde.org/D29248
+---
+ src/pdiff.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pdiff.cpp b/src/pdiff.cpp
+index f3f2284..3588e3e 100644
+--- a/src/pdiff.cpp
++++ b/src/pdiff.cpp
+@@ -1577,7 +1577,7 @@ void KDiff3App::slotClipboardChanged()
+ {
+ const QClipboard* clipboard = QApplication::clipboard();
+ const QMimeData* mimeData = clipboard->mimeData();
+- if(mimeData->hasText())
++ if(mimeData && mimeData->hasText())
+ {
+ QString s = clipboard->text();
+ editPaste->setEnabled(!s.isEmpty());
+--
+cgit v1.1
+
diff --git a/kde-misc/kdiff3/kdiff3-1.8.2-r1.ebuild b/kde-misc/kdiff3/kdiff3-1.8.2-r1.ebuild
new file mode 100644
index 00000000000..114f5b83e86
--- /dev/null
+++ b/kde-misc/kdiff3/kdiff3-1.8.2-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="forceoptional"
+KFMIN=5.60.0
+QTMIN=5.12.3
+inherit ecm kde.org
+
+DESCRIPTION="Frontend to diff3 based on KDE Frameworks"
+HOMEPAGE="https://kde.org/applications/development/org.kde.kdiff3
+https://userbase.kde.org/KDiff3"
+SRC_URI="mirror://kde/stable/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="5"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE=""
+
+DEPEND="
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtprintsupport-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kcrash-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/kparts-${KFMIN}:5
+ >=kde-frameworks/ktextwidgets-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+"
+RDEPEND="${DEPEND}
+ sys-apps/diffutils
+"
+
+PATCHES=( "${FILESDIR}/${P}-crash-w-o-clipboard.patch" )