summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-04-04 13:37:08 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-04-04 15:19:40 +0200
commit1a86f8153a3b23901d5511d43d9838b4b5c46495 (patch)
tree5c72d76d6f4829873b9f849422642e654a4d1790 /kde-frameworks/kirigami/files/kirigami-5.80.0-fix-crash-in-SizeGroup.patch
parentkde-frameworks/kio: Drop 5.80.1-r1 (diff)
downloadgentoo-1a86f8153a3b23901d5511d43d9838b4b5c46495.tar.gz
gentoo-1a86f8153a3b23901d5511d43d9838b4b5c46495.tar.bz2
gentoo-1a86f8153a3b23901d5511d43d9838b4b5c46495.zip
kde-frameworks/kirigami: Fix systemsettings crash installing themes
Upstream commit 29dabab2f536827bc1ecec63f5a0b0a76f0809e5 See also: https://invent.kde.org/frameworks/kirigami/-/merge_requests/253 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=434079 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kirigami/files/kirigami-5.80.0-fix-crash-in-SizeGroup.patch')
-rw-r--r--kde-frameworks/kirigami/files/kirigami-5.80.0-fix-crash-in-SizeGroup.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/kde-frameworks/kirigami/files/kirigami-5.80.0-fix-crash-in-SizeGroup.patch b/kde-frameworks/kirigami/files/kirigami-5.80.0-fix-crash-in-SizeGroup.patch
new file mode 100644
index 00000000000..7d13d2fa1bf
--- /dev/null
+++ b/kde-frameworks/kirigami/files/kirigami-5.80.0-fix-crash-in-SizeGroup.patch
@@ -0,0 +1,41 @@
+From 29dabab2f536827bc1ecec63f5a0b0a76f0809e5 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Tue, 9 Mar 2021 14:30:44 +0000
+Subject: [PATCH] Fix potential crash in SizeGroup
+
+SizeGroup keeps a cache of a list of items, and when one updates does
+calculations based on all items.
+
+This list is stored as a list of QPointers as we don't explicitly track
+deletion.
+
+We have a list of items and guard for deletion, but they're QML owned.
+So there's a point in time when it's pending deletion with the garbage
+collector but the lower level object isn't managed by an engine.
+
+As we go via QQmlProperty(item, QStringLiteral("Layout.preferredWidth"),
+qmlContext(item)).write(maxWidth) this is problematic.
+
+BUG: 434079
+---
+ src/sizegroup.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/sizegroup.cpp b/src/sizegroup.cpp
+index 2035b6eb..a9a0ebf8 100644
+--- a/src/sizegroup.cpp
++++ b/src/sizegroup.cpp
+@@ -98,6 +98,10 @@ void SizeGroup::adjustItems(Mode whatChanged)
+ continue;
+ }
+
++ if (!qmlEngine(item)) {
++ continue;
++ }
++
+ switch (m_mode) {
+ case Mode::Width:
+ QQmlProperty(item, QStringLiteral("Layout.preferredWidth"), qmlContext(item)).write(maxWidth);
+--
+GitLab
+