[arch-commits] Commit in bluedevil/trunk (KDEBUG-337193.patch PKGBUILD)
Andrea Scarpino
andrea at archlinux.org
Wed Dec 24 07:15:58 UTC 2014
Date: Wednesday, December 24, 2014 @ 08:15:58
Author: andrea
Revision: 227982
upgpkg: bluedevil 1:2.1-1
Upstream release
Modified:
bluedevil/trunk/PKGBUILD
Deleted:
bluedevil/trunk/KDEBUG-337193.patch
---------------------+
KDEBUG-337193.patch | 151 --------------------------------------------------
PKGBUILD | 13 +---
2 files changed, 4 insertions(+), 160 deletions(-)
Deleted: KDEBUG-337193.patch
===================================================================
--- KDEBUG-337193.patch 2014-12-24 07:15:49 UTC (rev 227981)
+++ KDEBUG-337193.patch 2014-12-24 07:15:58 UTC (rev 227982)
@@ -1,151 +0,0 @@
-From: David Rosca <nowrep at gmail.com>
-Date: Sat, 13 Dec 2014 12:20:24 +0000
-Subject: Bluedevil daemon: Save and restore adapters state
-X-Git-Url: http://quickgit.kde.org/?p=bluedevil.git&a=commitdiff&h=ff6ae6022286e118e98efd69ba1833f2be2e4842
----
-Bluedevil daemon: Save and restore adapters state
-
-Fixes issue that some adapters were always powered off
-on startup.
-
-BUG: 337193
----
-
-
---- a/src/daemon/kded/BlueDevilDaemon.cpp
-+++ b/src/daemon/kded/BlueDevilDaemon.cpp
-@@ -36,6 +36,7 @@
- #include <KPluginFactory>
- #include <kfileplacesmodel.h>
- #include <kdirnotify.h>
-+#include <ksharedconfig.h>
-
- #include <bluedevil/bluedevilmanager.h>
- #include <bluedevil/bluedeviladapter.h>
-@@ -66,6 +67,7 @@
- QTimer m_timer;
- KComponentData m_componentData;
- QHash<QString, bool> m_adapterPoweredHash;
-+ KSharedConfig::Ptr m_config;
- };
-
- BlueDevilDaemon::BlueDevilDaemon(QObject *parent, const QList<QVariant>&)
-@@ -83,6 +85,7 @@
- , QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForUnregistration, this);
- d->m_timer.setInterval(20000);
- d->m_timer.setSingleShot(true);
-+ d->m_config = KSharedConfig::openConfig("bluedevilglobalrc");
-
- KAboutData aboutData(
- "bluedevildaemon",
-@@ -106,6 +109,8 @@
-
- connect(Manager::self(), SIGNAL(usableAdapterChanged(Adapter*)),
- this, SLOT(usableAdapterChanged(Adapter*)));
-+ connect(Manager::self(), SIGNAL(adapterAdded(Adapter*)),
-+ this, SLOT(adapterAdded(Adapter*)));
-
- // Catch suspend/resume events
- QDBusConnection::systemBus().connect("org.freedesktop.login1",
-@@ -117,6 +122,8 @@
- );
-
- d->m_status = Private::Offline;
-+
-+ restoreAdaptersState();
- usableAdapterChanged(Manager::self()->usableAdapter());
-
- if (!Manager::self()->adapters().isEmpty()) {
-@@ -126,6 +133,8 @@
-
- BlueDevilDaemon::~BlueDevilDaemon()
- {
-+ saveAdaptersState();
-+
- if (d->m_status == Private::Online) {
- offlineMode();
- }
-@@ -344,6 +353,11 @@
- }
- }
-
-+void BlueDevilDaemon::adapterAdded(Adapter *adapter)
-+{
-+ restoreAdapterState(adapter);
-+}
-+
- void BlueDevilDaemon::deviceFound(Device *device)
- {
- kDebug(dblue()) << "DeviceFound: " << device->name();
-@@ -359,6 +373,47 @@
- qDebug() << "Error response: " << reply.error().message();
- killMonolithic();
- }
-+}
-+
-+void BlueDevilDaemon::saveAdaptersState()
-+{
-+ Manager *manager = Manager::self();
-+ if (!manager) {
-+ return;
-+ }
-+
-+ KConfigGroup adaptersGroup = d->m_config->group("Adapters");
-+
-+ Q_FOREACH (Adapter *adapter, manager->adapters()) {
-+ const QString key = QString("%1_powered").arg(adapter->address());
-+ adaptersGroup.writeEntry<bool>(key, adapter->isPowered());
-+ }
-+
-+ d->m_config->sync();
-+}
-+
-+// New adapters are automatically powered on
-+void BlueDevilDaemon::restoreAdaptersState()
-+{
-+ Manager *manager = Manager::self();
-+ if (!manager) {
-+ return;
-+ }
-+
-+ KConfigGroup adaptersGroup = d->m_config->group("Adapters");
-+
-+ Q_FOREACH (Adapter *adapter, manager->adapters()) {
-+ const QString key = QString("%1_powered").arg(adapter->address());
-+ adapter->setPowered(adaptersGroup.readEntry<bool>(key, true));
-+ }
-+}
-+
-+void BlueDevilDaemon::restoreAdapterState(Adapter *adapter)
-+{
-+ KConfigGroup adaptersGroup = d->m_config->group("Adapters");
-+
-+ const QString key = QString("%1_powered").arg(adapter->address());
-+ adapter->setPowered(adaptersGroup.readEntry<bool>(key, true));
- }
-
- DeviceInfo BlueDevilDaemon::deviceToInfo(Device *const device) const
-
---- a/src/daemon/kded/BlueDevilDaemon.h
-+++ b/src/daemon/kded/BlueDevilDaemon.h
-@@ -82,6 +82,8 @@
- */
- void usableAdapterChanged(Adapter *adapter);
-
-+ void adapterAdded(Adapter *adapter);
-+
- /**
- * When the agent is released this is called to unload it
- */
-@@ -97,6 +99,10 @@
- void executeMonolithic();
- void killMonolithic();
-
-+ void saveAdaptersState();
-+ void restoreAdaptersState();
-+ void restoreAdapterState(Adapter *adapter);
-+
- DeviceInfo deviceToInfo (Device *const device) const;
-
- private:
-
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-12-24 07:15:49 UTC (rev 227981)
+++ PKGBUILD 2014-12-24 07:15:58 UTC (rev 227982)
@@ -2,8 +2,8 @@
# Maintainer: Andrea Scarpino <andrea at archlinux.org>
pkgname=bluedevil
-pkgver=2.0
-pkgrel=2
+pkgver=2.1
+pkgrel=1
epoch=1
pkgdesc='KDE bluetooth framework'
arch=('i686' 'x86_64')
@@ -13,16 +13,11 @@
makedepends=('cmake' 'automoc4')
optdepends=('kdebase-workspace: to run the plasmoid')
install="${pkgname}.install"
-source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz"
- 'KDEBUG-337193.patch')
-md5sums=('c318b94d6de3d516598208e32cbccad6'
- '9b89d5741c951b3d940faa4cfda0a738')
+source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz")
+md5sums=('7b154bdebd971df9e838f290b76a2cd0')
prepare() {
mkdir build
-
- cd ${pkgname}-${pkgver}
- patch -p1 -i "${srcdir}"/KDEBUG-337193.patch
}
build(){
More information about the arch-commits
mailing list