Hello community,
here is the log from the commit of package libbluedevil for openSUSE:Factory checked in at 2012-05-08 06:45:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libbluedevil (Old)
and /work/SRC/openSUSE:Factory/.libbluedevil.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libbluedevil", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/libbluedevil/libbluedevil.changes 2011-11-05 11:20:23.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libbluedevil.new/libbluedevil.changes 2012-05-08 06:45:59.000000000 +0200
@@ -1,0 +2,8 @@
+Tue May 1 10:36:55 UTC 2012 - mlin@suse.com
+
+- Update to version 1.9.2
+ * Fill properties with defaults in case that GetProperties is not valid (kde#288865)
+ * Print possible errors using qDebug and fix dbus handling
+ * When BlueZ service is unregistered, remove all adapters
+
+-------------------------------------------------------------------
Old:
----
libbluedevil-1.9.1.tar.bz2
New:
----
libbluedevil-1.9.2.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libbluedevil.spec ++++++
--- /var/tmp/diff_new_pack.cNpaHn/_old 2012-05-08 06:46:00.000000000 +0200
+++ /var/tmp/diff_new_pack.cNpaHn/_new 2012-05-08 06:46:00.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libbluedevil
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 Raymond Wooninck
#
# All modifications and additions to the file contributed by third parties
@@ -17,14 +17,13 @@
#
-
Name: libbluedevil
-Version: 1.9.1
-Release: 1
-License: LGPL-2.0+
+Version: 1.9.2
+Release: 0
Summary: Qt Bluetooth client library
-Url: http://www.kde.org
+License: LGPL-2.0+
Group: System/Libraries
+Url: http://www.kde.org
Source0: ftp://ftp.kde.org/pub/kde/stable/libbluedevil/%{version}/src/%{name}-%{version}.tar.bz2
BuildRequires: cmake
BuildRequires: kde4-filesystem
++++++ libbluedevil-1.9.1.tar.bz2 -> libbluedevil-1.9.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbluedevil-1.9.1/.gitignore new/libbluedevil-1.9.2/.gitignore
--- old/libbluedevil-1.9.1/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/libbluedevil-1.9.2/.gitignore 2012-04-26 05:28:30.000000000 +0200
@@ -0,0 +1,4 @@
+build
+.kdev4
+libbluedevil.kdev4
+doc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbluedevil-1.9.1/bluedevil/bluedevil.pc.in new/libbluedevil-1.9.2/bluedevil/bluedevil.pc.in
--- old/libbluedevil-1.9.1/bluedevil/bluedevil.pc.in 2011-10-09 12:42:22.000000000 +0200
+++ new/libbluedevil-1.9.2/bluedevil/bluedevil.pc.in 2012-04-26 05:28:30.000000000 +0200
@@ -1,5 +1,5 @@
prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@CMAKE_INSTALL_PREFIX@/lib
+libdir=@LIB_INSTALL_DIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
Name: bluedevil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbluedevil-1.9.1/bluedevil/bluedeviladapter.cpp new/libbluedevil-1.9.2/bluedevil/bluedeviladapter.cpp
--- old/libbluedevil-1.9.1/bluedevil/bluedeviladapter.cpp 2011-10-09 12:42:22.000000000 +0200
+++ new/libbluedevil-1.9.2/bluedevil/bluedeviladapter.cpp 2012-04-26 05:28:30.000000000 +0200
@@ -41,6 +41,7 @@
~Private();
void fetchProperties();
+ void setDefaultProperties();
void startDiscovery();
void _k_deviceCreated(const QDBusObjectPath &objectPath);
@@ -88,7 +89,19 @@
void Adapter::Private::fetchProperties()
{
- const QVariantMap properties = m_bluezAdapterInterface->GetProperties().value();
+ QDBusPendingReply <QVariantMap > reply = m_bluezAdapterInterface->GetProperties();
+
+ //This may happen when the AdapterRemoved signal has been emitted but the adapter
+ //is still returned by Manager::defaultAdapter
+ reply.waitForFinished();
+ if (!reply.isValid() || reply.isError()) {
+ qDebug() << reply.error().name();
+ qDebug() << reply.error().message();
+ setDefaultProperties();
+ return;
+ }
+
+ const QVariantMap properties = reply.value();
m_address = properties["Address"].toString();
m_name = properties["Name"].toString();
m_class = properties["Class"].toUInt();
@@ -106,6 +119,19 @@
m_propertiesFetched = true;
}
+void Adapter::Private::setDefaultProperties()
+{
+ m_address = QString();
+ m_name = QString();
+ m_class = 0;
+ m_powered = false;
+ m_discoverable = false;
+ m_pairable = false;
+ m_pairableTimeout = 0;
+ m_discoverableTimeout = 0;
+ m_discovering = false;
+}
+
void Adapter::Private::startDiscovery()
{
qDeleteAll(m_devicesMap);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbluedevil-1.9.1/bluedevil/bluedevilmanager.cpp new/libbluedevil-1.9.2/bluedevil/bluedevilmanager.cpp
--- old/libbluedevil-1.9.1/bluedevil/bluedevilmanager.cpp 2011-10-09 12:42:22.000000000 +0200
+++ new/libbluedevil-1.9.2/bluedevil/bluedevilmanager.cpp 2012-04-26 05:28:30.000000000 +0200
@@ -135,6 +135,7 @@
void Manager::Private::_k_adapterAdded(const QDBusObjectPath &objectPath)
{
+ qDebug() << "Added: " << objectPath.path();
Adapter *const adapter = new Adapter(objectPath.path(), m_q);
m_adaptersHash.insert(objectPath.path(), adapter);
if (!m_defaultAdapter) {
@@ -152,6 +153,7 @@
void Manager::Private::_k_adapterRemoved(const QDBusObjectPath &objectPath)
{
+ qDebug() << "Removed: " << objectPath.path();
Adapter *const adapter = m_adaptersHash.take(objectPath.path()); // return and remove it from the hash
if (m_adaptersHash.isEmpty()) {
m_defaultAdapter = 0;
@@ -203,15 +205,21 @@
void Manager::Private::_k_bluezServiceUnregistered()
{
- m_bluezServiceRunning = false;
- if (m_defaultAdapter) {
- m_defaultAdapter = 0;
- emit m_q->defaultAdapterChanged(0);
- }
- if (m_usableAdapter) {
- m_usableAdapter = 0;
- emit m_q->usableAdapterChanged(0);
+ QHashIterator i(m_adaptersHash);
+ while (i.hasNext()) {
+ i.next();
+ Adapter *adapter = m_adaptersHash.take(i.key());
+ emit m_q->adapterRemoved(adapter);
+ delete adapter;
}
+
+ m_usableAdapter = 0;
+ m_defaultAdapter = 0;
+
+ emit m_q->usableAdapterChanged(0);
+ emit m_q->defaultAdapterChanged(0);
+
+ m_bluezServiceRunning = false;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org