diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-01-05 14:25:26 +0100 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2018-01-08 11:31:22 +0000 |
commit | caad6365b291cc5066ff5aaacdc1b6e02818bc10 (patch) | |
tree | acac8e423bba0292ae4a896f66949218dc5d6aab | |
parent | 5a67821b9615b5fc17cab405566a81cc7f554ad4 (diff) |
BlueZ: Fix inconsistent QLEService error state
Emitting just the signal does not change the error state. setError()
ensures that the error state/member and the error signal are emitted.
Change-Id: Idc044b8b97d4025b0f3a4d172c11c6b3a4e81ecb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluez.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp index 3359edf0..9435d479 100644 --- a/src/bluetooth/qlowenergycontroller_bluez.cpp +++ b/src/bluetooth/qlowenergycontroller_bluez.cpp @@ -1244,9 +1244,9 @@ void QLowEnergyControllerPrivate::processReply( } else if (!isServiceDiscoveryRun) { // not encryption problem -> abort readCharacteristic()/readDescriptor() run if (!descriptorHandle) - emit service->error(QLowEnergyService::CharacteristicReadError); + service->setError(QLowEnergyService::CharacteristicReadError); else - emit service->error(QLowEnergyService::DescriptorReadError); + service->setError(QLowEnergyService::DescriptorReadError); } } else { if (!descriptorHandle) |