aboutsummaryrefslogtreecommitdiff
path: root/tests/test-settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-settings.cpp')
-rw-r--r--tests/test-settings.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test-settings.cpp b/tests/test-settings.cpp
index b9658f4..9e206ae 100644
--- a/tests/test-settings.cpp
+++ b/tests/test-settings.cpp
@@ -50,7 +50,18 @@ protected:
super::SetUp();
m_gsettings = g_settings_new(SETTINGS_INTERFACE);
- m_gsettings_cal_notification = g_settings_new_with_path(SETTINGS_NOTIFY_SCHEMA_ID, SETTINGS_NOTIFY_CALENDAR_PATH);
+ GSettingsSchemaSource *pSource = g_settings_schema_source_get_default();
+ GSettingsSchema *pSchema = g_settings_schema_source_lookup(pSource, SETTINGS_NOTIFY_SCHEMA_ID, TRUE);
+
+ if (pSchema != NULL)
+ {
+ g_settings_schema_unref(pSchema);
+ m_gsettings_cal_notification = g_settings_new_with_path(SETTINGS_NOTIFY_SCHEMA_ID, SETTINGS_NOTIFY_CALENDAR_PATH);
+ }
+ else
+ {
+ m_gsettings_cal_notification = NULL;
+ }
m_live.reset(new LiveSettings);
m_settings = std::dynamic_pointer_cast<Settings>(m_live);