diff options
Diffstat (limited to 'kde-plasma/plasma-desktop/files/plasma-desktop-5.8.5-taskman-memleak.patch')
-rw-r--r-- | kde-plasma/plasma-desktop/files/plasma-desktop-5.8.5-taskman-memleak.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.8.5-taskman-memleak.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.8.5-taskman-memleak.patch new file mode 100644 index 000000000000..b112edced777 --- /dev/null +++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.8.5-taskman-memleak.patch @@ -0,0 +1,43 @@ +commit 58e932c607db27bea2872625661991fb16c79d13 +Author: Kai Uwe Broulik <kde@privat.broulik.de> +Date: Tue Jan 3 09:37:38 2017 +0100 + + [Task Manager] Parent QAction to "parent" instead of this + + This ensures the QAction is disposed of once the menu gets destroyed rather than + accumulating forever - the methods already took a "parent" argument, + which is passed the menu from QML side, for exactly that purpose. + + Differential Revision: https://phabricator.kde.org/D3816 + +diff --git a/applets/taskmanager/plugin/backend.cpp b/applets/taskmanager/plugin/backend.cpp +index 16f1f57..efbd095 100644 +--- a/applets/taskmanager/plugin/backend.cpp ++++ b/applets/taskmanager/plugin/backend.cpp +@@ -142,7 +142,7 @@ QVariantList Backend::jumpListActions(const QUrl &launcherUrl, QObject *parent) + continue; + } + +- QAction *action = new QAction(this); ++ QAction *action = new QAction(parent); + action->setText(name); + action->setIcon(QIcon::fromTheme(actionGroup.readEntry("Icon"))); + action->setProperty("exec", exec); +@@ -204,7 +204,7 @@ QVariantList Backend::recentDocumentActions(const QUrl &launcherUrl, QObject *pa + continue; + } + +- QAction *action = new QAction(this); ++ QAction *action = new QAction(parent); + action->setText(url.fileName()); + action->setIcon(QIcon::fromTheme(fileItem.iconName(), QIcon::fromTheme("unknown"))); + action->setProperty("agent", storageId); +@@ -219,7 +219,7 @@ QVariantList Backend::recentDocumentActions(const QUrl &launcherUrl, QObject *pa + } + + if (actionCount > 0) { +- QAction *action = new QAction(this); ++ QAction *action = new QAction(parent); + action->setText(i18n("Forget Recent Documents")); + action->setProperty("agent", storageId); + connect(action, &QAction::triggered, this, &Backend::handleRecentDocumentAction); |