summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-10-03 09:50:56 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-10-03 10:43:34 +0200
commit1a38474d5b3a3483b58993054b53cff2fe509e19 (patch)
tree48d010696ff39d841160e255605f6f371605dd5e /kde-plasma/plasma-thunderbolt
parentdev-python/pandas: Stabilize 1.4.4 x86, #874252 (diff)
downloadgentoo-1a38474d5b3a3483b58993054b53cff2fe509e19.tar.gz
gentoo-1a38474d5b3a3483b58993054b53cff2fe509e19.tar.bz2
gentoo-1a38474d5b3a3483b58993054b53cff2fe509e19.zip
kde-plasma/plasma-thunderbolt: Fix crash
Upstream commit 09c37c1c312991d08c10c7af94a83902150cb3ad Closes: https://bugs.gentoo.org/873634 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/plasma-thunderbolt')
-rw-r--r--kde-plasma/plasma-thunderbolt/files/plasma-thunderbolt-5.25.5-kcm-crash.patch71
-rw-r--r--kde-plasma/plasma-thunderbolt/plasma-thunderbolt-5.25.5-r1.ebuild40
2 files changed, 111 insertions, 0 deletions
diff --git a/kde-plasma/plasma-thunderbolt/files/plasma-thunderbolt-5.25.5-kcm-crash.patch b/kde-plasma/plasma-thunderbolt/files/plasma-thunderbolt-5.25.5-kcm-crash.patch
new file mode 100644
index 000000000000..f45edfa86f77
--- /dev/null
+++ b/kde-plasma/plasma-thunderbolt/files/plasma-thunderbolt-5.25.5-kcm-crash.patch
@@ -0,0 +1,71 @@
+From 09c37c1c312991d08c10c7af94a83902150cb3ad Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Mon, 27 Jun 2022 16:46:08 +0100
+Subject: [PATCH] Avoid combining smart pointers and qobject parent ownership
+
+Devices are stored as QSharedPointer<Device> mDevices. If something has
+the memory managed explicitly we don't want QObject parents to also try
+and do the same job.
+
+BUG: 439192
+---
+ src/lib/device.cpp | 4 ++--
+ src/lib/device.h | 2 +-
+ src/lib/manager.cpp | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/lib/device.cpp b/src/lib/device.cpp
+index b79d029..94964be 100644
+--- a/src/lib/device.cpp
++++ b/src/lib/device.cpp
+@@ -45,10 +45,10 @@ Device::Device(const QDBusObjectPath &path, QObject *parent)
+
+ Device::~Device() = default;
+
+-QSharedPointer<Device> Device::create(const QDBusObjectPath &path, QObject *parent)
++QSharedPointer<Device> Device::create(const QDBusObjectPath &path)
+ {
+ try {
+- return QSharedPointer<Device>::create(path, parent);
++ return QSharedPointer<Device>::create(path);
+ } catch (const DBusException &e) {
+ qCWarning(log_libkbolt, "%s", e.what());
+ return {};
+diff --git a/src/lib/device.h b/src/lib/device.h
+index 9b7e0f0..d183b12 100644
+--- a/src/lib/device.h
++++ b/src/lib/device.h
+@@ -46,7 +46,7 @@ class KBOLT_EXPORT Device : public QObject, public QEnableSharedFromThis<Device>
+ friend class Manager;
+
+ public:
+- static QSharedPointer<Device> create(const QDBusObjectPath &path, QObject *parent = nullptr);
++ static QSharedPointer<Device> create(const QDBusObjectPath &path);
+ explicit Device(QObject *parent = nullptr);
+ ~Device() override;
+
+diff --git a/src/lib/manager.cpp b/src/lib/manager.cpp
+index 683c28c..99f1732 100644
+--- a/src/lib/manager.cpp
++++ b/src/lib/manager.cpp
+@@ -26,7 +26,7 @@ Manager::Manager(QObject *parent)
+ }
+
+ connect(mInterface.get(), &ManagerInterface::DeviceAdded, this, [this](const QDBusObjectPath &path) {
+- if (auto device = Device::create(path, this)) {
++ if (auto device = Device::create(path)) {
+ mDevices.push_back(device);
+ qCDebug(log_libkbolt,
+ "New Thunderbolt device %s (%s) added, status=%s",
+@@ -46,7 +46,7 @@ Manager::Manager(QObject *parent)
+
+ const auto devicePaths = mInterface->ListDevices().argumentAt<0>();
+ for (const auto &devicePath : devicePaths) {
+- if (auto device = Device::create(devicePath, this)) {
++ if (auto device = Device::create(devicePath)) {
+ qCDebug(log_libkbolt,
+ "Discovered Thunderbolt device %s (%s), status=%s",
+ qUtf8Printable(device->uid()),
+--
+GitLab
+
diff --git a/kde-plasma/plasma-thunderbolt/plasma-thunderbolt-5.25.5-r1.ebuild b/kde-plasma/plasma-thunderbolt/plasma-thunderbolt-5.25.5-r1.ebuild
new file mode 100644
index 000000000000..137f827fe9df
--- /dev/null
+++ b/kde-plasma/plasma-thunderbolt/plasma-thunderbolt-5.25.5-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="true"
+KFMIN=5.95.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.5
+inherit ecm plasma.kde.org
+
+DESCRIPTION="Plasma integration for controlling Thunderbolt devices"
+HOMEPAGE="https://invent.kde.org/plasma/plasma-thunderbolt"
+
+LICENSE="|| ( GPL-2 GPL-3+ )"
+SLOT="5"
+KEYWORDS="~amd64 ~riscv ~x86"
+IUSE=""
+
+# tests require DBus
+RESTRICT="test"
+
+DEPEND="
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ sys-apps/bolt
+"
+
+PATCHES=( "${FILESDIR}/${P}-kcm-crash.patch" )