diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2017-05-31 21:39:48 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2017-05-31 22:21:28 +0200 |
commit | 5ee12cc942812f6368b3824a6aa2174a17eb338f (patch) | |
tree | 075a2d6470413022e3a02ed34ab4442b4637fcd2 /kde-frameworks/kdeclarative | |
parent | www-client/chromium: dev channel bump (60.0.3112.7) (diff) | |
download | gentoo-5ee12cc942812f6368b3824a6aa2174a17eb338f.tar.gz gentoo-5ee12cc942812f6368b3824a6aa2174a17eb338f.tar.bz2 gentoo-5ee12cc942812f6368b3824a6aa2174a17eb338f.zip |
kde-frameworks/kdeclarative: Fix plasmashell/taskman memleak
See also: https://bugs.kde.org/show_bug.cgi?id=380270
Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'kde-frameworks/kdeclarative')
-rw-r--r-- | kde-frameworks/kdeclarative/files/kdeclarative-5.34.0-memleak.patch | 73 | ||||
-rw-r--r-- | kde-frameworks/kdeclarative/kdeclarative-5.34.0-r1.ebuild | 34 |
2 files changed, 107 insertions, 0 deletions
diff --git a/kde-frameworks/kdeclarative/files/kdeclarative-5.34.0-memleak.patch b/kde-frameworks/kdeclarative/files/kdeclarative-5.34.0-memleak.patch new file mode 100644 index 000000000000..43fdb8a4bf66 --- /dev/null +++ b/kde-frameworks/kdeclarative/files/kdeclarative-5.34.0-memleak.patch @@ -0,0 +1,73 @@ +From 695f24fb522a5ae6fe2530cbd72d3966b234b025 Mon Sep 17 00:00:00 2001 +From: David Edmundson <kde@davidedmundson.co.uk> +Date: Wed, 31 May 2017 10:08:25 +0100 +Subject: [PATCH] Don't leak MimeData object + +Summary: +A DeclarativeDropArea creates a new DeclarativeDragDropEvent on every +enter/move/leave event. + +The getter method for the mimeData property creates a new MimeData +QObject wrapper, which then leaks. + +Use of the mimeData object outside of the event shouldn't be expected to +work, and a quick grep couldn't find any usage. + +BUG: 380270 + +Test Plan: Dragged some things + +Reviewers: #plasma, mart, hein + +Reviewed By: #plasma, mart, hein + +Subscribers: hein, plasma-devel, #frameworks + +Tags: #plasma, #frameworks + +Differential Revision: https://phabricator.kde.org/D6017 +--- + src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp | 4 ++-- + src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h | 5 ++--- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp +index 5c1b0e3..a75f85f 100644 +--- a/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp ++++ b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp +@@ -65,7 +65,7 @@ DeclarativeMimeData* DeclarativeDragDropEvent::mimeData() + if (!m_data && m_event) { + // TODO This should be using MimeDataWrapper eventually, although this is an API break, + // so will need to be done carefully. +- m_data = new DeclarativeMimeData(m_event->mimeData()); ++ m_data.reset(new DeclarativeMimeData(m_event->mimeData())); + } +- return m_data; ++ return m_data.data(); + } +diff --git a/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h +index 3fd846d..b35568a 100644 +--- a/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h ++++ b/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h +@@ -26,8 +26,7 @@ + + #include <QObject> + #include "DeclarativeDropArea.h" +- +-class DeclarativeMimeData; ++#include "DeclarativeMimeData.h" + + class DeclarativeDragDropEvent : public QObject + { +@@ -115,7 +114,7 @@ private: + int m_y; + Qt::MouseButtons m_buttons; + Qt::KeyboardModifiers m_modifiers; +- DeclarativeMimeData* m_data; ++ QScopedPointer<DeclarativeMimeData> m_data; + QDropEvent* m_event; + }; + +-- +2.13.0 + diff --git a/kde-frameworks/kdeclarative/kdeclarative-5.34.0-r1.ebuild b/kde-frameworks/kdeclarative/kdeclarative-5.34.0-r1.ebuild new file mode 100644 index 000000000000..da3138effd9e --- /dev/null +++ b/kde-frameworks/kdeclarative/kdeclarative-5.34.0-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +KDE_TEST="false" +inherit kde5 + +DESCRIPTION="Framework providing integration of QML and KDE work spaces" +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="" + +# drop qtdeclarative subslot operator when QT_MINIMAL >= 5.8.0 +DEPEND=" + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep kglobalaccel) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kio) + $(add_frameworks_dep kpackage) + $(add_frameworks_dep kservice) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kwindowsystem) + $(add_qt_dep qtdeclarative '' '' '5=') + $(add_qt_dep qtgui) + $(add_qt_dep qtnetwork) + $(add_qt_dep qtwidgets) + media-libs/libepoxy +" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}/${P}-memleak.patch" ) |