summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/bluez
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-11-12 09:53:02 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-11-12 09:53:29 +0100
commit0738b5963165bd013278a6ac4c083817e5bba7d3 (patch)
treeeaf773acf877561751578c4f99db073b01d71f28 /src/bluetooth/bluez
parent6e4acfe76bb29c8b0196e6116b54deb489f8da4d (diff)
parent1ebd4d02a67a162411af88b26c899bfb8cf871ca (diff)
Merge remote-tracking branch 'gerrit/dev' into neard
Diffstat (limited to 'src/bluetooth/bluez')
-rw-r--r--src/bluetooth/bluez/bluez5_helper_p.h11
-rw-r--r--src/bluetooth/bluez/bluez_data_p.h4
-rw-r--r--src/bluetooth/bluez/hcimanager.cpp8
3 files changed, 17 insertions, 6 deletions
diff --git a/src/bluetooth/bluez/bluez5_helper_p.h b/src/bluetooth/bluez/bluez5_helper_p.h
index e1fb90c5..a3f164b0 100644
--- a/src/bluetooth/bluez/bluez5_helper_p.h
+++ b/src/bluetooth/bluez/bluez5_helper_p.h
@@ -34,6 +34,17 @@
#ifndef BLUEZ5_HELPER_H
#define BLUEZ5_HELPER_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#include <QtCore/QObject>
#include <QtDBus/QtDBus>
#include <QtBluetooth/QBluetoothAddress>
diff --git a/src/bluetooth/bluez/bluez_data_p.h b/src/bluetooth/bluez/bluez_data_p.h
index dc12dda2..3722b80d 100644
--- a/src/bluetooth/bluez/bluez_data_p.h
+++ b/src/bluetooth/bluez/bluez_data_p.h
@@ -50,6 +50,8 @@
#include <sys/socket.h>
#include <QtBluetooth/QBluetoothUuid>
+QT_BEGIN_NAMESPACE
+
#define BTPROTO_L2CAP 0
#define BTPROTO_HCI 1
#define BTPROTO_RFCOMM 3
@@ -331,4 +333,6 @@ typedef struct {
} __attribute__ ((packed)) evt_encrypt_change;
#define EVT_ENCRYPT_CHANGE_SIZE 4
+QT_END_NAMESPACE
+
#endif // BLUEZ_DATA_P_H
diff --git a/src/bluetooth/bluez/hcimanager.cpp b/src/bluetooth/bluez/hcimanager.cpp
index bf2754f5..30511ae5 100644
--- a/src/bluetooth/bluez/hcimanager.cpp
+++ b/src/bluetooth/bluez/hcimanager.cpp
@@ -219,12 +219,8 @@ QBluetoothAddress HciManager::addressForConnectionHandle(quint16 handle) const
}
for (int i = 0; i < infoList->conn_num; i++) {
- if (info[i].handle == handle) {
- quint64 converted;
- convertAddress(info[i].bdaddr.b, converted);
-
- return QBluetoothAddress(converted);
- }
+ if (info[i].handle == handle)
+ return QBluetoothAddress(convertAddress(info[i].bdaddr.b));
}
return QBluetoothAddress();