diff options
author | Claudiu Olteanu <olteanu.claudiu@ymail.com> | 2015-07-18 23:14:00 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-20 05:51:38 -0700 |
commit | 8c373f419d95a8359491c50ac149bf84e6aa4201 (patch) | |
tree | bb7f47ad682b9cd69bbdbb4ff6e98f798f15a0f0 /qtserialbluetooth.cpp | |
parent | 8d2b6142c61934979a70b6b6d85a529575b8c297 (diff) | |
download | subsurface-8c373f419d95a8359491c50ac149bf84e6aa4201.tar.gz |
Use SPP's uuid to connect to a device on Apple platforms
Use the uuid of the Serial Port Profile service to connect to a remote
Bluetooth device on OS X (and iOS) platforms with a Qt version greater
than 5.5.0.
In the future the same section should be used for BT connectivity on
Linux platforms. Currently there is a problem with the SDP discovery
and it doesn't work as expected.
[Dirk Hohndel: modified OS check for consistency]
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qtserialbluetooth.cpp')
-rw-r--r-- | qtserialbluetooth.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qtserialbluetooth.cpp b/qtserialbluetooth.cpp index 95f3611cf..5a982d68b 100644 --- a/qtserialbluetooth.cpp +++ b/qtserialbluetooth.cpp @@ -80,7 +80,7 @@ static int qt_serial_open(serial_t **out, dc_context_t *context, const char* dev loop.exec(); } } -#elif defined(Q_OS_ANDROID) +#elif defined(Q_OS_ANDROID) || (QT_VERSION >= 0x050500 && defined(Q_OS_MAC)) // Try to connect to the device using the uuid of the Serial Port Profile service QBluetoothAddress remoteDeviceAddress(devaddr); serial_port->socket->connectToService(remoteDeviceAddress, QBluetoothUuid(QBluetoothUuid::SerialPort)); |