summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
diff options
context:
space:
mode:
authorMichael Zanetti <michael.zanetti@nokia.com>2011-09-07 12:02:00 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-07 03:31:39 +0200
commitbd4df1e8e148cee77f76830a43ddc044b7a6903c (patch)
treec6a5aedafa2670e0b193843bd0271306eefdecd7 /src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
parent5788b49130e1b2648beab531016d1e61cf3d5444 (diff)
re-added autotests
Change-Id: Ic2be21fd11e2fdb96185fe9269cebbe08b6de87a Reviewed-on: http://codereview.qt-project.org/4783 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp')
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
index 3a510afa..a0b0f052 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
@@ -48,7 +48,7 @@
#include "bluez/adapter_p.h"
#include "bluez/device_p.h"
-//#define QTM_DEVICEDISCOVERY_DEBUG
+//#define QT_DEVICEDISCOVERY_DEBUG
QBluetoothDeviceDiscoveryAgentPrivate::QBluetoothDeviceDiscoveryAgentPrivate()
: lastError(QBluetoothDeviceDiscoveryAgent::NoError), pendingCancel(false), pendingStart(false), adapter(0)
@@ -86,7 +86,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
reply.waitForFinished();
if (reply.isError()) {
errorString = reply.error().message();
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << Q_FUNC_INFO << "ERROR: " << errorString;
#endif
lastError = QBluetoothDeviceDiscoveryAgent::IOFailure;
@@ -107,7 +107,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
QDBusPendingReply<QVariantMap> propertiesReply = adapter->GetProperties();
propertiesReply.waitForFinished();
if(propertiesReply.isError()) {
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << Q_FUNC_INFO << "ERROR: " << errorString;
#endif
errorString = propertiesReply.error().message();
@@ -125,7 +125,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
lastError = QBluetoothDeviceDiscoveryAgent::IOFailure;
Q_Q(QBluetoothDeviceDiscoveryAgent);
emit q->error(lastError);
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << Q_FUNC_INFO << "ERROR: " << errorString;
#endif
return;
@@ -135,7 +135,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start()
void QBluetoothDeviceDiscoveryAgentPrivate::stop()
{
if (adapter) {
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << Q_FUNC_INFO;
#endif
pendingCancel = true;
@@ -152,7 +152,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &addres
const QString btName = dict.value(QLatin1String("Name")).toString();
quint32 btClass = dict.value(QLatin1String("Class")).toUInt();
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << "Discovered: " << address << btName
<< "Num UUIDs" << dict.value(QLatin1String("UUIDs")).toStringList().count()
<< "total device" << discoveredDevices.count() << "cached"
@@ -172,14 +172,14 @@ void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &addres
for(int i = 0; i < discoveredDevices.size(); i++){
if(discoveredDevices[i].address() == device.address()) {
if(discoveredDevices[i] == device) {
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << "Duplicate: " << address;
#endif
return;
}
discoveredDevices.replace(i, device);
Q_Q(QBluetoothDeviceDiscoveryAgent);
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << "Updated: " << address;
#endif
@@ -187,7 +187,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &addres
return; // this works if the list doesn't contain duplicates. Don't let it.
}
}
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << "Emit: " << address;
#endif
discoveredDevices.append(device);
@@ -198,7 +198,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::_q_deviceFound(const QString &addres
void QBluetoothDeviceDiscoveryAgentPrivate::_q_propertyChanged(const QString &name,
const QDBusVariant &value)
{
-#ifdef QTM_DEVICEDISCOVERY_DEBUG
+#ifdef QT_DEVICEDISCOVERY_DEBUG
qDebug() << Q_FUNC_INFO << name << value.variant();
#endif