From b7b979d1735764930cc6f736cfa8e22b71547ea8 Mon Sep 17 00:00:00 2001 From: Thiemo van Engelen Date: Wed, 13 Nov 2019 08:45:14 +0100 Subject: bluez: Fix out of sync property cache Since commit 2c6dcc643, a map containing dbus property values is kept per device to be able to make QBluetoothDeviceInfo instances without having to make dbus calls. However, this map could get out of sync. The reason was that the code started to listen to PropertyChanged signals after it received the initial set of properties. This meant that there was a short amount of time where bluez could send out a signal with changed properties and the DiscoveryAgent would not receive it. In order to keep the map in sync, a PropertyChanged listener is now installed when scanning is started, picking up all changes. Change-Id: Iae5e219b187e94bf280a6dd76ccde49cafd1d9c5 Reviewed-by: Alex Blasche --- src/bluetooth/qbluetoothdevicediscoveryagent_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_p.h') diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_p.h b/src/bluetooth/qbluetoothdevicediscoveryagent_p.h index 27220a09..c9a35c3d 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_p.h +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_p.h @@ -142,6 +142,7 @@ public: void _q_discoveryFinished(); void _q_discoveryInterrupted(const QString &path); void _q_PropertiesChanged(const QString &interface, + const QString &path, const QVariantMap &changed_properties, const QStringList &invalidated_properties); void _q_extendedDeviceDiscoveryTimeout(); -- cgit v1.2.3