diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-10-17 09:42:01 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-10-17 09:42:13 +0200 |
commit | fc2a206322f6190226ebc1f04062f2c9170f0bac (patch) | |
tree | 7df8ca41816c24ccfa6e0c6add4612689a933bdd /src/bluetooth/qbluetoothserver_osx.mm | |
parent | ca5490859338f28e30104668a353275d23df1ec6 (diff) | |
parent | 125cdccc346903d6e70ed26289cdaed85e26ec3f (diff) |
Merge remote-tracking branch 'gerrit/dev' into btle
Change-Id: Ia1cbaac9774ce2bc1b6972c02bad34fa593d40ff
Diffstat (limited to 'src/bluetooth/qbluetoothserver_osx.mm')
-rw-r--r-- | src/bluetooth/qbluetoothserver_osx.mm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothserver_osx.mm b/src/bluetooth/qbluetoothserver_osx.mm index 8896651d..a1774d14 100644 --- a/src/bluetooth/qbluetoothserver_osx.mm +++ b/src/bluetooth/qbluetoothserver_osx.mm @@ -237,7 +237,7 @@ QBluetoothServerPrivate *QBluetoothServerPrivate::registeredServer(quint16 port, qCWarning(QT_BT_OSX) << "invalid protocol"; } - return Q_NULLPTR; + return nullptr; } void QBluetoothServerPrivate::unregisterServer(QBluetoothServerPrivate *server) @@ -291,6 +291,8 @@ bool QBluetoothServer::listen(const QBluetoothAddress &address, quint16 port) { typedef QBluetoothServerPrivate::ObjCListener ObjCListener; + OSXBluetooth::qt_test_iobluetooth_runloop(); + if (d_ptr->listener) { qCWarning(QT_BT_OSX) << "already in listen mode, close server first"; return false; @@ -441,7 +443,7 @@ bool QBluetoothServer::hasPendingConnections() const QBluetoothSocket *QBluetoothServer::nextPendingConnection() { if (!d_ptr->pendingConnections.size()) - return Q_NULLPTR; + return nullptr; QScopedPointer<QBluetoothSocket> newSocket(new QBluetoothSocket); QBluetoothServerPrivate::PendingConnection channel(d_ptr->pendingConnections.front()); @@ -451,10 +453,10 @@ QBluetoothSocket *QBluetoothServer::nextPendingConnection() if (d_ptr->serverType == QSInfo::RfcommProtocol) { if (!newSocket->d_ptr->setChannel(static_cast<IOBluetoothRFCOMMChannel *>(channel))) - return Q_NULLPTR; + return nullptr; } else { if (!newSocket->d_ptr->setChannel(static_cast<IOBluetoothL2CAPChannel *>(channel))) - return Q_NULLPTR; + return nullptr; } return newSocket.take(); |