mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-28 03:48:53 +02:00
GDBus: Remove cached value if a property is invalidated
Also add a test case to catch this. Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
@@ -696,6 +696,7 @@ on_properties_changed (GDBusConnection *connection,
|
||||
GVariantIter iter;
|
||||
gchar *key;
|
||||
GVariant *value;
|
||||
guint n;
|
||||
|
||||
error = NULL;
|
||||
changed_properties = NULL;
|
||||
@@ -728,6 +729,11 @@ on_properties_changed (GDBusConnection *connection,
|
||||
value); /* adopts value */
|
||||
}
|
||||
|
||||
for (n = 0; invalidated_properties[n] != NULL; n++)
|
||||
{
|
||||
g_hash_table_remove (proxy->priv->properties, invalidated_properties[n]);
|
||||
}
|
||||
|
||||
/* emit signal */
|
||||
g_signal_emit (proxy, signals[PROPERTIES_CHANGED_SIGNAL],
|
||||
0,
|
||||
|
Reference in New Issue
Block a user