Qt Connectivity
Go to file
Ivan Solovev 42b3dd064d Fix QBluetoothDeviceInfo::isCached() on Windows
The Windows backend was unconditionally marking each discovered device
as cached. However, a correct thing to do it to only mark those devices
that come from the OS cache.
For Windows these are always the paired devices.

However, there's one caveat here as well. If the device is cached, but
at the same time actually available, Windows will first report it with
rssi == 0 (at least in case of BTLE devices), and only then deliver an
update with the correct RSSI value.

This patch implements the following logic:
* All newly-discovered paired devices are marked as cached first
* Once there's an update, the device is not considered as cached
  anymore.

This works fine for BTLE devices, because they regularly report at
least the RSSI updates.

For Classic Bluetooth we don't have any device updates during the
discovery, so simply rely on the pairing status at the time of
initial discovery.

Fixes: QTBUG-140825
Pick-to: 6.10 6.8
Change-Id: Ifd9ca57fe837522be01555984637cea65094900c
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2025-10-09 15:45:18 +02:00
LICENSES QtNfc: Rewrite NDEF Editor example using Qt Quick Components 2023-02-08 15:14:00 +01:00
cmake Fix the naming of the BlueZ package 2022-12-23 11:27:01 +01:00
coin Remove unnecessary comment 2025-03-05 16:05:48 +01:00
config.tests Correct license for build system files 2024-04-04 16:26:23 +02:00
dist Remove year from Qt Copyright in REUSE.toml 2025-07-14 09:46:49 +02:00
examples Account for safe margins in low energy scanner example 2025-10-09 15:21:29 +03:00
src Fix QBluetoothDeviceInfo::isCached() on Windows 2025-10-09 15:45:18 +02:00
tests Remove extra semi-colons 2025-08-28 21:47:10 +09:00
.cmake.conf Bump version to 6.11.0 2025-06-14 06:00:37 +01:00
.gitattributes Update the git-archive export options 2013-09-27 17:03:46 +02:00
.gitignore Remove stale .gitignore entries 2025-04-02 12:10:26 +02:00
.gitreview Add .gitreview file 2025-03-24 16:08:19 +01:00
.tag Update the git-archive export options 2012-09-10 12:57:49 +02:00
CMakeLists.txt Move `qt_internal_project_setup` as early as possible 2025-06-20 15:27:42 +02:00
REUSE.toml Remove year from Qt Copyright in REUSE.toml 2025-07-14 09:46:49 +02:00
configure.cmake Add features bluetooth and nfc 2025-02-10 15:49:59 +01:00
dependencies.yaml Update dependencies on 'dev' in qt/qtconnectivity 2025-10-09 11:36:55 +00:00
licenseRule.json Update licensing of files with infrastructure type 2025-03-12 16:05:25 +01:00
qt_cmdline.cmake Add features bluetooth and nfc 2025-02-10 15:49:59 +01:00