diff options
author | Thiemo van Engelen <tvanengelen@victronenergy.com> | 2019-11-13 08:45:14 +0100 |
---|---|---|
committer | Thiemo van Engelen <tvanengelen@victronenergy.com> | 2019-12-04 10:54:06 +0100 |
commit | b7b979d1735764930cc6f736cfa8e22b71547ea8 (patch) | |
tree | 0a14102309c2377c3fd05f1518155e272bab5694 /src/bluetooth/bluez | |
parent | 355f09eccc5ceba421e8c522e04cb7be72fa0a75 (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/bluez')
-rw-r--r-- | src/bluetooth/bluez/properties_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bluetooth/bluez/properties_p.h b/src/bluetooth/bluez/properties_p.h index 16a43e80..d8a7b6cb 100644 --- a/src/bluetooth/bluez/properties_p.h +++ b/src/bluetooth/bluez/properties_p.h @@ -58,7 +58,8 @@ public Q_SLOTS: // METHODS } Q_SIGNALS: // SIGNALS - void PropertiesChanged(const QString &interface, const QVariantMap &changed_properties, const QStringList &invalidated_properties); + void PropertiesChanged(const QString &interface, const QVariantMap &changed_properties, const QStringList &invalidated_properties, + const QDBusMessage &msg); }; namespace org { |