* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/bluedevil/, kde-plasma/bluedevil/files/
@ 2021-12-10 14:58 Andreas Sturmlechner
0 siblings, 0 replies; only message in thread
From: Andreas Sturmlechner @ 2021-12-10 14:58 UTC (permalink / raw
To: gentoo-commits
commit: ec9c85c78ade23d13098c698aa656a6b66d82c0f
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 10 14:42:20 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Dec 10 14:58:22 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec9c85c7
kde-plasma/bluedevil: Save bluetooth status on teardown
Upstream commit daaa18920ae93b482585eb3df790a6d5a647b6db
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445376
Package-Manager: Portage-3.0.29, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
kde-plasma/bluedevil/bluedevil-5.23.4-r1.ebuild | 45 +++++++++++
...-5.23.4-save-bluetooth-status-on-teardown.patch | 89 ++++++++++++++++++++++
2 files changed, 134 insertions(+)
diff --git a/kde-plasma/bluedevil/bluedevil-5.23.4-r1.ebuild b/kde-plasma/bluedevil/bluedevil-5.23.4-r1.ebuild
new file mode 100644
index 000000000000..323013532ab8
--- /dev/null
+++ b/kde-plasma/bluedevil/bluedevil-5.23.4-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KFMIN=5.86.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="Bluetooth stack for KDE Plasma"
+HOMEPAGE="https://invent.kde.org/plasma/bluedevil"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+PATCHES=(
+ "${FILESDIR}"/${P}-save-bluetooth-status-on-teardown.patch # KDE-bug 445376
+)
+
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/bluez-qt-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kio-${KFMIN}:5
+ >=kde-frameworks/knotifications-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kwindowsystem-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ >=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
diff --git a/kde-plasma/bluedevil/files/bluedevil-5.23.4-save-bluetooth-status-on-teardown.patch b/kde-plasma/bluedevil/files/bluedevil-5.23.4-save-bluetooth-status-on-teardown.patch
new file mode 100644
index 000000000000..1a0a28e50ec9
--- /dev/null
+++ b/kde-plasma/bluedevil/files/bluedevil-5.23.4-save-bluetooth-status-on-teardown.patch
@@ -0,0 +1,89 @@
+From daaa18920ae93b482585eb3df790a6d5a647b6db Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Fri, 19 Nov 2021 19:37:58 -0700
+Subject: [PATCH] Save bluetooth status on teardown
+
+Instead of watching for the shutdown and restart signals, just save
+status anytime kded quits, which automatically covers those use cases as
+well as when logging out. This is what the code was already halfway
+doing; let's go all the way.
+
+BUG: 445376
+FIXED-IN: 5.23.5
+(cherry picked from commit e57bb7580251f38e798bea21cdad43a3f90f2568)
+---
+ src/kded/devicemonitor.cpp | 29 +++--------------------------
+ src/kded/devicemonitor.h | 1 -
+ 2 files changed, 3 insertions(+), 27 deletions(-)
+
+diff --git a/src/kded/devicemonitor.cpp b/src/kded/devicemonitor.cpp
+index 735747ee..5090a8be 100644
+--- a/src/kded/devicemonitor.cpp
++++ b/src/kded/devicemonitor.cpp
+@@ -46,15 +46,6 @@ DeviceMonitor::DeviceMonitor(BlueDevilDaemon *daemon)
+ this,
+ SLOT(login1PrepareForSleep(bool)));
+
+- // Catch shutdown events so we can save status when shutting down and
+- // optionally resume when starting up
+- QDBusConnection::systemBus().connect(QStringLiteral("org.freedesktop.login1"),
+- QStringLiteral("/org/freedesktop/login1"),
+- QStringLiteral("org.freedesktop.login1.Manager"),
+- QStringLiteral("PrepareForShutdown"),
+- this,
+- SLOT(login1PrepareForShutdown(bool)));
+-
+ // Set initial state
+ const KConfigGroup globalGroup = m_config->group("Global");
+ const QString launchState = globalGroup.readEntry("launchState", "remember");
+@@ -75,17 +66,11 @@ DeviceMonitor::DeviceMonitor(BlueDevilDaemon *daemon)
+ }
+ }
+
+-// Save state when tearing down to avoid getting out of sync if kded crashes
+-// or is manually restarted
+ DeviceMonitor::~DeviceMonitor()
+ {
+- KConfigGroup globalGroup = m_config->group("Global");
+-
+- if (m_manager->isBluetoothBlocked()) {
+- globalGroup.writeEntry<bool>("bluetoothBlocked", true);
+- } else {
+- globalGroup.deleteEntry("bluetoothBlocked");
+- }
++ // Save state when tearing down to avoid getting out of sync if kded crashes
++ // or is manually restarted
++ saveState();
+ }
+
+ KFilePlacesModel *DeviceMonitor::places()
+@@ -140,14 +125,6 @@ void DeviceMonitor::login1PrepareForSleep(bool active)
+ }
+ }
+
+-void DeviceMonitor::login1PrepareForShutdown(bool active)
+-{
+- if (active) {
+- qCDebug(BLUEDAEMON) << "About to shut down";
+- saveState();
+- }
+-}
+-
+ void DeviceMonitor::saveState()
+ {
+ KConfigGroup adaptersGroup = m_config->group("Adapters");
+diff --git a/src/kded/devicemonitor.h b/src/kded/devicemonitor.h
+index 6a35fed4..a7b38cab 100644
+--- a/src/kded/devicemonitor.h
++++ b/src/kded/devicemonitor.h
+@@ -35,7 +35,6 @@ private Q_SLOTS:
+
+ void deviceConnectedChanged(bool connected);
+ void login1PrepareForSleep(bool active);
+- void login1PrepareForShutdown(bool active);
+
+ private:
+ void restoreState();
+--
+GitLab
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-10 14:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-10 14:58 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/bluedevil/, kde-plasma/bluedevil/files/ Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox