diff options
-rw-r--r-- | src/bluetooth/osx/osxbtcentralmanager.mm | 8 | ||||
-rw-r--r-- | src/bluetooth/osx/osxbtcentralmanager_p.h | 3 | ||||
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluezdbus.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qndefnfctextrecord.cpp | 2 | ||||
-rw-r--r-- | src/nfc/qndefnfcurirecord.cpp | 2 |
5 files changed, 15 insertions, 3 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager.mm b/src/bluetooth/osx/osxbtcentralmanager.mm index b56dc0d5..9254bd98 100644 --- a/src/bluetooth/osx/osxbtcentralmanager.mm +++ b/src/bluetooth/osx/osxbtcentralmanager.mm @@ -229,6 +229,9 @@ QT_END_NAMESPACE qCWarning(QT_BT_OSX, "Timeout while reading a descriptor"); [self peripheral:peripheral didUpdateValueForDescriptor:objectUnderWatch error:nsError]; break; + case OperationTimeout::characteristicWrite: + qCWarning(QT_BT_OSX, "Timeout while writing a characteristic with response"); + [self peripheral:peripheral didWriteValueForCharacteristic:objectUnderWatch error:nsError]; default:; } } @@ -751,6 +754,7 @@ QT_END_NAMESPACE return [self performNextRequest]; requestPending = true; + [self watchAfter:characteristic timeout:OperationTimeout::characteristicWrite]; [peripheral writeValue:data.data() forCharacteristic:characteristic type:CBCharacteristicWriteWithResponse]; } else { @@ -1621,6 +1625,10 @@ QT_END_NAMESPACE QT_BT_MAC_AUTORELEASEPOOL; + if (characteristic != objectUnderWatch) + return; + + [self stopWatchdog]; requestPending = false; diff --git a/src/bluetooth/osx/osxbtcentralmanager_p.h b/src/bluetooth/osx/osxbtcentralmanager_p.h index c0f278b2..e172d874 100644 --- a/src/bluetooth/osx/osxbtcentralmanager_p.h +++ b/src/bluetooth/osx/osxbtcentralmanager_p.h @@ -95,7 +95,8 @@ enum class OperationTimeout characteristicsDiscovery, characteristicRead, descriptorsDiscovery, - descriptorRead + descriptorRead, + characteristicWrite }; // In Qt we work with handles and UUIDs. Core Bluetooth diff --git a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp index afc4b8c1..8f001f92 100644 --- a/src/bluetooth/qlowenergycontroller_bluezdbus.cpp +++ b/src/bluetooth/qlowenergycontroller_bluezdbus.cpp @@ -289,7 +289,10 @@ void QLowEnergyControllerPrivateBluezDBus::connectToDevice() if (device->connected() && device->servicesResolved()) { //connectToDevice is noop disconnectSignalRequired = true; + setState(QLowEnergyController::ConnectedState); + Q_Q(QLowEnergyController); + emit q->connected(); return; } diff --git a/src/nfc/qndefnfctextrecord.cpp b/src/nfc/qndefnfctextrecord.cpp index 78736cc0..95fb4c66 100644 --- a/src/nfc/qndefnfctextrecord.cpp +++ b/src/nfc/qndefnfctextrecord.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE /*! \class QNdefNfcTextRecord - \brief The QNdefNfcTextRecord class provides an NFC RTD-Text + \brief The QNdefNfcTextRecord class provides an NFC RTD-Text. \ingroup connectivity-nfc \inmodule QtNfc diff --git a/src/nfc/qndefnfcurirecord.cpp b/src/nfc/qndefnfcurirecord.cpp index 44b17adf..3438d9f2 100644 --- a/src/nfc/qndefnfcurirecord.cpp +++ b/src/nfc/qndefnfcurirecord.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE /*! \class QNdefNfcUriRecord - \brief The QNdefNfcUriRecord class provides an NFC RTD-URI + \brief The QNdefNfcUriRecord class provides an NFC RTD-URI. \ingroup connectivity-nfc \inmodule QtNfc |