diff options
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/deviceinfo.cpp')
-rw-r--r-- | examples/bluetooth/lowenergyscanner/deviceinfo.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/bluetooth/lowenergyscanner/deviceinfo.cpp b/examples/bluetooth/lowenergyscanner/deviceinfo.cpp index 1102012b..24ab5661 100644 --- a/examples/bluetooth/lowenergyscanner/deviceinfo.cpp +++ b/examples/bluetooth/lowenergyscanner/deviceinfo.cpp @@ -2,10 +2,14 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include <qbluetoothuuid.h> - #include "deviceinfo.h" +#ifdef Q_OS_DARWIN +# include <QtBluetooth/qbluetoothuuid.h> +#else +# include <QtBluetooth/qbluetoothaddress.h> +#endif + DeviceInfo::DeviceInfo(const QBluetoothDeviceInfo &d) { device = d; @@ -13,7 +17,7 @@ DeviceInfo::DeviceInfo(const QBluetoothDeviceInfo &d) QString DeviceInfo::getAddress() const { -#ifdef Q_OS_MAC +#ifdef Q_OS_DARWIN // On OS X and iOS we do not have addresses, // only unique UUIDs generated by Core Bluetooth. return device.deviceUuid().toString(); |