summaryrefslogtreecommitdiff
path: root/kde-frameworks/plasma/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-10 04:21:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-10 04:21:55 +0100
commit677b7ba5c317778df2ad7e70df94b9b7eec4adbc (patch)
tree6c418a1546fff5becab5d8b9ed6803323e7f316e /kde-frameworks/plasma/files
parentfbda87924e6faa7a1919f1a2b4182490bde5ec5c (diff)
gentoo resync : 10.09.2021
Diffstat (limited to 'kde-frameworks/plasma/files')
-rw-r--r--kde-frameworks/plasma/files/plasma-5.85.0-fix-ExpandableListItem-overlapping.patch41
-rw-r--r--kde-frameworks/plasma/files/plasma-5.85.0-fix-svgicon-memleak.patch37
-rw-r--r--kde-frameworks/plasma/files/plasma-5.85.0-fix-theme-memleak.patch86
3 files changed, 164 insertions, 0 deletions
diff --git a/kde-frameworks/plasma/files/plasma-5.85.0-fix-ExpandableListItem-overlapping.patch b/kde-frameworks/plasma/files/plasma-5.85.0-fix-ExpandableListItem-overlapping.patch
new file mode 100644
index 000000000000..8063039b7626
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.85.0-fix-ExpandableListItem-overlapping.patch
@@ -0,0 +1,41 @@
+From f393bace87e5fc8c0e68eff9faf0656df64715ed Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Wed, 1 Sep 2021 12:30:01 -0600
+Subject: [PATCH] ExpandableListItem: Fix overlapping entries with many
+ expanded items
+
+A previous hack was done wrong, and was not taking into account disabled
+items.
+
+BUG: 428102
+FIXED-IN: 5.86
+---
+ .../plasmaextracomponents/qml/ExpandableListItem.qml | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml b/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml
+index 47b3e3684..851961a4c 100644
+--- a/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml
++++ b/src/declarativeimports/plasmaextracomponents/qml/ExpandableListItem.qml
+@@ -523,7 +523,7 @@ Item {
+
+ // Container for actions list, so that we can add left and right margins to it
+ Item {
+- height: actionsList.contentHeight
++ height: actionsList.height
+ width: mainRowLayout.width
+
+ // TODO: Implement keyboard focus
+@@ -538,7 +538,8 @@ Item {
+ anchors.leftMargin: listItemIcon.width + PlasmaCore.Units.smallSpacing
+ anchors.rightMargin: listItemIcon.width + PlasmaCore.Units.smallSpacing * 2
+
+- height: PlasmaCore.Units.gridUnit * 2 * actionsList.count
++ // Need to take into account disabled/invisible items
++ height: PlasmaCore.Units.gridUnit * 2 * Array.from(contextualActionsModel).filter(item => item.enabled).length
+
+ focus: true
+ clip: true
+--
+GitLab
+
diff --git a/kde-frameworks/plasma/files/plasma-5.85.0-fix-svgicon-memleak.patch b/kde-frameworks/plasma/files/plasma-5.85.0-fix-svgicon-memleak.patch
new file mode 100644
index 000000000000..89896911d0a2
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.85.0-fix-svgicon-memleak.patch
@@ -0,0 +1,37 @@
+From 73782c8b39d1cc41fef003acca8df75ccdf384e4 Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <kde@mattwhitlock.name>
+Date: Mon, 16 Aug 2021 19:37:28 -0400
+Subject: [PATCH] avoid holding onto old Svg object when changing source of an
+ IconItem
+
+A long-lived IconItem instance can have its source changed many times
+over its lifetime. Because SvgSource parents its internal Plasma::Svg
+instance to the IconItem instance, this means that such Plasma::Svg
+instance was not being destroyed when its responsible SvgSource
+instance is destroyed and indeed would not be destroyed until the
+IconItem instance is eventually destroyed, which could be arbitrarily
+much later. This commit adds an explicit call in the SvgSource
+destructor to delete the Plasma::Svg instance so it does not hang
+around in memory until the IconItem instance is destroyed. This fixes
+one of the major memory "leaks" in plasmashell.
+---
+ src/declarativeimports/core/iconitem.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp
+index 0db750acd..3f06b8b0e 100644
+--- a/src/declarativeimports/core/iconitem.cpp
++++ b/src/declarativeimports/core/iconitem.cpp
+@@ -196,6 +196,9 @@ public:
+ {
+ if (m_svgIcon) {
+ QObject::disconnect(m_iconItem, nullptr, m_svgIcon, nullptr);
++ // the parent IconItem can outlive this IconItemSource, so delete our Plasma::Svg object
++ // explicitly to avoid leaving unreferenced Plasma::Svg objects parented to the IconItem
++ delete m_svgIcon;
+ }
+ }
+
+--
+GitLab
+
diff --git a/kde-frameworks/plasma/files/plasma-5.85.0-fix-theme-memleak.patch b/kde-frameworks/plasma/files/plasma-5.85.0-fix-theme-memleak.patch
new file mode 100644
index 000000000000..1d7dc596c20e
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.85.0-fix-theme-memleak.patch
@@ -0,0 +1,86 @@
+From 14b495f933dadace7832fa6cbc809c3abdb7c682 Mon Sep 17 00:00:00 2001
+From: Matt Whitlock <kde@mattwhitlock.name>
+Date: Mon, 28 Jun 2021 18:01:14 -0400
+Subject: [PATCH] don't make duplicate connections to
+ ThemePrivate::onAppExitCleanup
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Plasma::Theme::Theme(…) and Plasma::Theme::setThemeName(…) were
+unconditionally connecting the QCoreApplication::aboutToQuit signal to
+the ThemePrivate::onAppExitCleanup slot, even though the ThemePrivate
+instances are cached and shared across multiple Theme instances. In
+long-running applications that make heavy use of the Svg class (such as
+plasmashell), a single ThemePrivate instance can be reused by huge
+numbers of Theme instances. If the reference count of that ThemePrivate
+instance never reaches zero, then the connections just keep piling up,
+contributing to excessive memory usage. This commit moves the relevant
+connect(…) call so that it only happens in the case that a new
+ThemePrivate instance is constructed. Thus, there will only ever be one
+connection from QCoreApplication::aboutToQuit to
+ThemePrivate::onAppExitCleanup per instance of ThemePrivate.
+---
+ src/plasma/theme.cpp | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/src/plasma/theme.cpp b/src/plasma/theme.cpp
+index fabf98f4e..f403d393b 100644
+--- a/src/plasma/theme.cpp
++++ b/src/plasma/theme.cpp
+@@ -39,13 +39,13 @@ Theme::Theme(QObject *parent)
+ if (!ThemePrivate::globalTheme) {
+ ThemePrivate::globalTheme = new ThemePrivate;
+ ThemePrivate::globalTheme->settingsChanged(false);
++ if (QCoreApplication::instance()) {
++ connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, ThemePrivate::globalTheme, &ThemePrivate::onAppExitCleanup);
++ }
+ }
+ ThemePrivate::globalTheme->ref.ref();
+ d = ThemePrivate::globalTheme;
+
+- if (QCoreApplication::instance()) {
+- connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, d, &ThemePrivate::onAppExitCleanup);
+- }
+ connect(d, &ThemePrivate::themeChanged, this, &Theme::themeChanged);
+ connect(d, &ThemePrivate::defaultFontChanged, this, &Theme::defaultFontChanged);
+ connect(d, &ThemePrivate::smallestFontChanged, this, &Theme::smallestFontChanged);
+@@ -57,6 +57,9 @@ Theme::Theme(const QString &themeName, QObject *parent)
+ auto &priv = ThemePrivate::themes[themeName];
+ if (!priv) {
+ priv = new ThemePrivate;
++ if (QCoreApplication::instance()) {
++ connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, priv, &ThemePrivate::onAppExitCleanup);
++ }
+ }
+
+ priv->ref.ref();
+@@ -68,9 +71,6 @@ Theme::Theme(const QString &themeName, QObject *parent)
+ d->setThemeName(themeName, false, false);
+ d->cacheTheme = useCache;
+ d->fixedName = true;
+- if (QCoreApplication::instance()) {
+- connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, d, &ThemePrivate::onAppExitCleanup);
+- }
+ connect(d, &ThemePrivate::themeChanged, this, &Theme::themeChanged);
+ }
+
+@@ -105,12 +105,12 @@ void Theme::setThemeName(const QString &themeName)
+ auto &priv = ThemePrivate::themes[themeName];
+ if (!priv) {
+ priv = new ThemePrivate;
++ if (QCoreApplication::instance()) {
++ connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, priv, &ThemePrivate::onAppExitCleanup);
++ }
+ }
+ priv->ref.ref();
+ d = priv;
+- if (QCoreApplication::instance()) {
+- connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, d, &ThemePrivate::onAppExitCleanup);
+- }
+ connect(d, &ThemePrivate::themeChanged, this, &Theme::themeChanged);
+ }
+
+--
+GitLab
+