summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdevicediscoveryagent_p.h
diff options
context:
space:
mode:
authorThiemo van Engelen <tvanengelen@victronenergy.com>2019-11-13 08:45:14 +0100
committerThiemo van Engelen <tvanengelen@victronenergy.com>2019-12-04 10:54:06 +0100
commitb7b979d1735764930cc6f736cfa8e22b71547ea8 (patch)
tree0a14102309c2377c3fd05f1518155e272bab5694 /src/bluetooth/qbluetoothdevicediscoveryagent_p.h
parent355f09eccc5ceba421e8c522e04cb7be72fa0a75 (diff)
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 <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_p.h')
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_p.h1
1 files changed, 1 insertions, 0 deletions
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();