diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-12-20 15:03:36 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-17 11:19:16 +0000 |
commit | 1c5c34385ac10f42283197eaa798a502f6c34f1f (patch) | |
tree | a661db0a19d589aa73d3cf66a826ea8ff09723a7 /.gitattributes | |
parent | 2ee2bf5f26216a6bd67f239a5aa6193367f9933e (diff) | |
download | qtconnectivity-1c5c34385ac10f42283197eaa798a502f6c34f1f.tar.gz |
QWinRTLowEnergyServiceHandler: optimize behavior at disconnect
The QWinRTLowEnergyServiceHandler helper class is used to query low
energy service details. It works in a background thread and performs
multiple async operations to get the results.
As the class works in a background thread, we use
QWinRTFunctions::await() to wait for the results of async operations.
This allows to simplify the code.
In practice the user might want to disconnect from the device while
service details discovery is performed. Previously the background
thread was still performing all the requests.
This patch handles the already-existing
QLowEnergyControllerPrivateWinRT::abortConnection() signal and
provides the exit condition to all QWinRTFunctions::await() calls,
so that the background thread does not do unnecessary work.
Task-number: QTBUG-108461
Change-Id: I1db05c906beb0078de8a00fd5e32d589306f6665
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit c68e5d0952036204b8d20b26f0de362b36c03511)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to '.gitattributes')
0 files changed, 0 insertions, 0 deletions