summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/lowenergyscanner/deviceinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/deviceinfo.cpp')
-rw-r--r--examples/bluetooth/lowenergyscanner/deviceinfo.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/examples/bluetooth/lowenergyscanner/deviceinfo.cpp b/examples/bluetooth/lowenergyscanner/deviceinfo.cpp
index d6b7a734..89371a76 100644
--- a/examples/bluetooth/lowenergyscanner/deviceinfo.cpp
+++ b/examples/bluetooth/lowenergyscanner/deviceinfo.cpp
@@ -1,8 +1,8 @@
/***************************************************************************
**
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtBluetooth module of the Qt Toolkit.
**
@@ -18,8 +18,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
@@ -39,6 +39,8 @@
**
****************************************************************************/
+#include <qbluetoothuuid.h>
+
#include "deviceinfo.h"
DeviceInfo::DeviceInfo()
@@ -52,7 +54,13 @@ DeviceInfo::DeviceInfo(const QBluetoothDeviceInfo &d)
QString DeviceInfo::getAddress() const
{
+#ifdef Q_OS_MAC
+ // On OS X and iOS we do not have addresses,
+ // only unique UUIDs generated by Core Bluetooth.
+ return device.deviceUuid().toString();
+#else
return device.address().toString();
+#endif
}
QString DeviceInfo::getName() const