summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-frameworks/kio/files')
-rw-r--r--kde-frameworks/kio/files/kio-5.67.0-memleak.patch43
1 files changed, 43 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 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