summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserver_osx.mm
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-09-30 16:40:52 +0200
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-10-01 07:01:30 +0200
commit48e81b139729b58e3c72ab82f2d1642eefc3a047 (patch)
tree292a8ae990c923ee80b2e9787f061e23afce48f0 /src/bluetooth/qbluetoothserver_osx.mm
parent7b4808089eb3b37dc3e954a44f938a0c11d592d0 (diff)
QBluetoothSocket - bugfix and mods for OS X.
- Emit disconnected if a channel was closed by IOBluetooth (== closed externally, not by Qt). - Trick to enable invokeMethod to work with a private class (not parseable by moc). - Fix inclusion guards _OSX_P_H, not _P_H (already in use). - QBluetoothServer - update include + reset a port to 0 in 'close'. Change-Id: Iaa35d6ca3ae1e8013b74d93a238d1afa4292a583 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserver_osx.mm')
-rw-r--r--src/bluetooth/qbluetoothserver_osx.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothserver_osx.mm b/src/bluetooth/qbluetoothserver_osx.mm
index 412fb28c..444a8992 100644
--- a/src/bluetooth/qbluetoothserver_osx.mm
+++ b/src/bluetooth/qbluetoothserver_osx.mm
@@ -41,7 +41,13 @@
#include "osx/osxbtsocketlistener_p.h"
#include "qbluetoothserver_osx_p.h"
+
+// The order is important: a workround for
+// a private header included by private header
+// (incorrectly handled dependencies).
+#include "qbluetoothsocket_p.h"
#include "qbluetoothsocket_osx_p.h"
+
#include "qbluetoothlocaldevice.h"
#include "osx/osxbtutility_p.h"
#include "qbluetoothserver.h"
@@ -289,6 +295,7 @@ void QBluetoothServer::close()
// Needs a lock :(
const QMutexLocker lock(&d_ptr->channelMapMutex());
d_ptr->unregisterServer(d_ptr);
+ d_ptr->port = 0;
}
bool QBluetoothServer::listen(const QBluetoothAddress &address, quint16 port)