GNOME Bugzilla – Bug 791290
GSettings object stops emitting "changed" signal on g_settings_reset after call to g_settings_delay
Last modified: 2018-05-24 19:57:54 UTC
Analyzing the code on gsettings.c, I found that when g_settings_delay is called, the backend is permanently "wrapped" in a GDelayedSettingsBackend object. Also, by looking at gdelayedsettingsbackend.c, I could notice that the implementation of g_delayed_settings_backend_reset [1] seems to be missing a call to g_settings_backend_changed, especially if compared to g_delayed_settings_backend_write [2]. Am I missing something? [1] https://git.gnome.org/browse/glib/tree/gio/gdelayedsettingsbackend.c#n195 [2] https://git.gnome.org/browse/glib/tree/gio/gdelayedsettingsbackend.c#n132 Thanks!
(In reply to Davi from comment #0) > I found that when g_settings_delay is > called, the backend is permanently "wrapped" in a GDelayedSettingsBackend > object. That’s expected. There’s no way to exit delay-apply mode. > Also, by looking at gdelayedsettingsbackend.c, I could notice that > the implementation of g_delayed_settings_backend_reset [1] seems to be > missing a call to g_settings_backend_changed, especially if compared to > g_delayed_settings_backend_write [2]. Am I missing something? Yes, it looks like that could be missing. Can you come up with a minimal test case to demonstrate this please?
Created attachment 365123 [details] Test case I think the test-case demonstrates the issue. It is showing a warning that I don't know how to fix, but that doesn't seem to interfere with the test.
Created attachment 367799 [details] [review] gsettings: Add missing changed() call to delayed settings backend When resetting a key in the delayed settings backend, g_settings_backend_changed() was not called to notify the backend of the change. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Review of attachment 367799 [details] [review]: Looks good, but some tests would certainly be nice.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1309.