summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothservicediscoveryagent.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2019-07-09 11:03:19 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2019-07-15 14:36:28 +0200
commit37c770825c1174c274fd09b2da1a7438d8c0a363 (patch)
treeff20fc90cb640e001f87ad860f101eddcfa07431 /src/bluetooth/qbluetoothservicediscoveryagent.cpp
parentcf1cb5ef0ff41c9a66e64d272293ad04efa180f0 (diff)
Service discovery agent - remove the public API implementation (macOS)
Instead, use the shared implementation (and the declaration from the *_p.h) Fixes: QTBUG-75348 Change-Id: Icbcbb752df1a9b8865ea4f4ef06f2b59dda577cd Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent.cpp')
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent.cpp b/src/bluetooth/qbluetoothservicediscoveryagent.cpp
index 9750b2aa..e76c2311 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent.cpp
+++ b/src/bluetooth/qbluetoothservicediscoveryagent.cpp
@@ -308,6 +308,13 @@ QBluetoothAddress QBluetoothServiceDiscoveryAgent::remoteAddress() const
return QBluetoothAddress();
}
+namespace OSXBluetooth {
+
+void qt_test_iobluetooth_runloop();
+
+}
+
+
/*!
Starts service discovery. \a mode specifies the type of service discovery to perform.
@@ -318,6 +325,10 @@ QBluetoothAddress QBluetoothServiceDiscoveryAgent::remoteAddress() const
void QBluetoothServiceDiscoveryAgent::start(DiscoveryMode mode)
{
Q_D(QBluetoothServiceDiscoveryAgent);
+#ifdef QT_OSX_BLUETOOTH
+ // Make sure we are on the right thread/have a run loop:
+ OSXBluetooth::qt_test_iobluetooth_runloop();
+#endif
if (d->discoveryState() == QBluetoothServiceDiscoveryAgentPrivate::Inactive
&& d->error != InvalidBluetoothAdapterError) {