summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2020-02-09 21:20:41 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2020-02-09 23:27:51 +0100
commit8dba7f7eba3b961468d2477f4e35da63419298f9 (patch)
treef61a16c9bf7bf3fad8744d2a9fa334161c0af96f /kde-frameworks
parentdev-ml/camlp4: restricted ocaml versions in deps (diff)
downloadgentoo-8dba7f7eba3b961468d2477f4e35da63419298f9.tar.gz
gentoo-8dba7f7eba3b961468d2477f4e35da63419298f9.tar.bz2
gentoo-8dba7f7eba3b961468d2477f4e35da63419298f9.zip
kde-frameworks/kio: Fix memory leak in KUrlNavigatorPlacesSelector
Reported-by: David Korth <gerbilsoft@gerbilsoft.com> Closes: https://bugs.gentoo.org/708876 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r--kde-frameworks/kio/files/kio-5.67.0-memleak.patch43
-rw-r--r--kde-frameworks/kio/kio-5.67.0-r1.ebuild88
2 files changed, 131 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.67.0-memleak.patch b/kde-frameworks/kio/files/kio-5.67.0-memleak.patch
new file mode 100644
index 000000000000..cf168b791836
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.67.0-memleak.patch
@@ -0,0 +1,43 @@
+From 213ed50634c02d8ec4aa91f0c307cfdd6f78170d Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Wed, 29 Jan 2020 19:50:33 +0100
+Subject: Fix memory leak in KUrlNavigatorPlacesSelector::updateMenu
+
+Summary:
+This method gets called each time solid notices a change, which can in some
+setups be very frequent. It leaked memory as the submenus and their actions
+were not deallocated properly.
+
+Test Plan: Builds. User feedback: "so far so good, 160 MB Memory usage". It was ~7GiB before this patch.
+
+Reviewers: #frameworks, davidedmundson, meven
+
+Reviewed By: davidedmundson, meven
+
+Subscribers: anthonyfieroni, meven, kde-frameworks-devel
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D27002
+---
+ src/filewidgets/kurlnavigatorplacesselector.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/filewidgets/kurlnavigatorplacesselector.cpp b/src/filewidgets/kurlnavigatorplacesselector.cpp
+index 7d33930..103a5fc 100644
+--- a/src/filewidgets/kurlnavigatorplacesselector.cpp
++++ b/src/filewidgets/kurlnavigatorplacesselector.cpp
+@@ -71,6 +71,11 @@ void KUrlNavigatorPlacesSelector::updateMenu()
+ {
+ m_placesMenu->clear();
+
++ // Submenus have to be deleted explicitly (QTBUG-11070)
++ for(QObject *obj : QObjectList(m_placesMenu->children())) {
++ delete qobject_cast<QMenu*>(obj); // Noop for nullptr
++ }
++
+ updateSelection(m_selectedUrl);
+
+ QString previousGroup;
+--
+cgit v1.1
diff --git a/kde-frameworks/kio/kio-5.67.0-r1.ebuild b/kde-frameworks/kio/kio-5.67.0-r1.ebuild
new file mode 100644
index 000000000000..3bd5e746e87e
--- /dev/null
+++ b/kde-frameworks/kio/kio-5.67.0-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_DESIGNERPLUGIN="true"
+ECM_TEST="forceoptional"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.12.3
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Framework providing transparent file and data management"
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="acl +handbook kerberos +kwallet X"
+
+# drop qtnetwork subslot operator when QT_MINIMAL >= 5.15.0
+RDEPEND="
+ dev-libs/libxml2
+ dev-libs/libxslt
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtnetwork-${QTMIN}:5=[ssl]
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=dev-qt/qtxml-${QTMIN}:5
+ =kde-frameworks/kauth-${PVCUT}*:5
+ =kde-frameworks/karchive-${PVCUT}*:5
+ =kde-frameworks/kbookmarks-${PVCUT}*:5
+ =kde-frameworks/kcodecs-${PVCUT}*:5
+ =kde-frameworks/kcompletion-${PVCUT}*:5
+ =kde-frameworks/kconfig-${PVCUT}*:5
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5
+ =kde-frameworks/kcrash-${PVCUT}*:5
+ =kde-frameworks/kdbusaddons-${PVCUT}*:5
+ =kde-frameworks/ki18n-${PVCUT}*:5
+ =kde-frameworks/kiconthemes-${PVCUT}*:5
+ =kde-frameworks/kitemviews-${PVCUT}*:5
+ =kde-frameworks/kjobwidgets-${PVCUT}*:5
+ =kde-frameworks/knotifications-${PVCUT}*:5
+ =kde-frameworks/kservice-${PVCUT}*:5
+ =kde-frameworks/ktextwidgets-${PVCUT}*:5
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5
+ =kde-frameworks/kxmlgui-${PVCUT}*:5
+ =kde-frameworks/solid-${PVCUT}*:5
+ acl? (
+ sys-apps/attr
+ virtual/acl
+ )
+ handbook? ( =kde-frameworks/kdoctools-${PVCUT}*:5 )
+ kerberos? ( virtual/krb5 )
+ kwallet? ( =kde-frameworks/kwallet-${PVCUT}*:5 )
+ X? ( >=dev-qt/qtx11extras-${QTMIN}:5 )
+"
+DEPEND="${RDEPEND}
+ >=dev-qt/qtconcurrent-${QTMIN}:5
+ test? ( sys-libs/zlib )
+ X? (
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXrender
+ )
+"
+PDEPEND="
+ >=kde-frameworks/kded-${PVCUT}:5
+"
+
+# tests hang
+RESTRICT+=" test"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-memleak.patch # bug 708876, KF-5.68
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package acl ACL)
+ $(cmake_use_find_package handbook KF5DocTools)
+ $(cmake_use_find_package kerberos GSSAPI)
+ $(cmake_use_find_package kwallet KF5Wallet)
+ $(cmake_use_find_package X X11)
+ )
+
+ ecm_src_configure
+}