aboutsummaryrefslogtreecommitdiff
path: root/tests/test-settings.cpp
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-08-30 02:38:51 +0200
committerRobert Tari <robert@tari.in>2021-08-30 02:40:00 +0200
commit0e8d75b5ba5eac277e3fbf964effd6c118a9da6b (patch)
tree0738d4519fb21633af326bfe7e452c3fcaa1f56a /tests/test-settings.cpp
parent22e66866c7b17fc655479ca911269b86cb80a744 (diff)
parent2d853c12ad91cb0ac066a60397cabc61631be5c1 (diff)
downloadayatana-indicator-datetime-0e8d75b5ba5eac277e3fbf964effd6c118a9da6b.tar.gz
ayatana-indicator-datetime-0e8d75b5ba5eac277e3fbf964effd6c118a9da6b.tar.bz2
ayatana-indicator-datetime-0e8d75b5ba5eac277e3fbf964effd6c118a9da6b.zip
Merge branch 'tari01-pr/fix-failing-tests'
Attributes GH PR #47: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/47
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);