public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/
Date: Sun,  9 Feb 2020 22:28:05 +0000 (UTC)	[thread overview]
Message-ID: <1581287271.8dba7f7eba3b961468d2477f4e35da63419298f9.asturm@gentoo> (raw)

commit:     8dba7f7eba3b961468d2477f4e35da63419298f9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  9 20:20:41 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 22:27:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dba7f7e

kde-frameworks/kio: Fix memory leak in KUrlNavigatorPlacesSelector

Reported-by: David Korth <gerbilsoft <AT> gerbilsoft.com>
Closes: https://bugs.gentoo.org/708876
Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-frameworks/kio/files/kio-5.67.0-memleak.patch | 43 +++++++++++
 kde-frameworks/kio/kio-5.67.0-r1.ebuild           | 88 +++++++++++++++++++++++
 2 files changed, 131 insertions(+)

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 00000000000..cf168b79183
--- /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 00000000000..3bd5e746e87
--- /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
+}


             reply	other threads:[~2020-02-09 22:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 22:28 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-25 19:51 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/ Andreas Sturmlechner
2023-12-25 19:51 Andreas Sturmlechner
2023-09-19 10:40 Andreas Sturmlechner
2023-04-22 16:21 Andreas Sturmlechner
2023-02-18 23:05 Andreas Sturmlechner
2023-01-30 21:43 Andreas Sturmlechner
2022-06-29 19:53 Andreas Sturmlechner
2022-02-10  9:13 Andreas Sturmlechner
2021-11-05 16:24 Andreas Sturmlechner
2021-09-14  9:04 Andreas Sturmlechner
2021-08-15 18:57 Andreas Sturmlechner
2021-07-11 20:47 Andreas Sturmlechner
2021-04-04 13:23 Andreas Sturmlechner
2021-02-03 22:33 Andreas Sturmlechner
2020-10-15 18:48 Andreas Sturmlechner
2020-09-29 12:49 Andreas Sturmlechner
2020-05-16  9:08 Andreas Sturmlechner
2020-05-15  8:16 Andreas Sturmlechner
2019-12-22 22:48 Andreas Sturmlechner
2019-12-19  9:45 Andreas Sturmlechner
2019-01-12 14:35 Andreas Sturmlechner
2018-11-27  7:49 Andreas Sturmlechner
2017-11-29 16:40 Andreas Sturmlechner
2017-11-26 18:57 Andreas Sturmlechner
2017-05-29 22:58 Andreas Sturmlechner
2016-09-29 11:39 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1581287271.8dba7f7eba3b961468d2477f4e35da63419298f9.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox