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>

Fixes: #1309
This commit is contained in:
Philip Withnall
2018-02-02 11:13:23 +01:00
parent 5558c668a9
commit 63abca2963
2 changed files with 20 additions and 0 deletions

View File

@@ -509,6 +509,24 @@ test_delay_apply (void)
g_assert_true (changed_cb_called);
g_assert_false (changed_cb_called2);
/* Try resetting the key and ensure a notification is emitted on the delayed #GSettings object. */
changed_cb_called = FALSE;
changed_cb_called2 = FALSE;
g_settings_reset (settings, "greeting");
g_assert_true (changed_cb_called);
g_assert_false (changed_cb_called2);
/* Locally change the greeting again. */
changed_cb_called = FALSE;
changed_cb_called2 = FALSE;
g_settings_set (settings, "greeting", "s", "greetings from test_delay_apply");
g_assert_true (changed_cb_called);
g_assert_false (changed_cb_called2);
writable = g_settings_is_writable (settings, "greeting");
g_assert_true (writable);