Skip to content

Commit

Permalink
Add a function to dump the schema entries when in debug
Browse files Browse the repository at this point in the history
 mode.
  • Loading branch information
Bob-IT committed Feb 17, 2023
1 parent 2306ef8 commit a1d1751
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libgnucash/app-utils/gnc-gsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,21 @@ gnc_gsettings_reset_schema (const gchar *schema_str)
g_strfreev (keys);
}

static void
gnc_settings_dump_schema_paths (void)
{
gchar **non_relocatable;

auto schema_source {g_settings_schema_source_get_default()};
g_settings_schema_source_list_schemas (schema_source, true,
&non_relocatable, nullptr);

for (gint i = 0; non_relocatable[i] != nullptr; i++)
PINFO("Schema entry %d is '%s'", i, non_relocatable[i]);

g_strfreev (non_relocatable);
}

void gnc_gsettings_load_backend (void)
{
ENTER("");
Expand Down Expand Up @@ -677,6 +692,9 @@ void gnc_gsettings_load_backend (void)
prefsbackend->block_all = gnc_gsettings_block_all;
prefsbackend->unblock_all = gnc_gsettings_unblock_all;

if (qof_log_check (log_module, QOF_LOG_DEBUG))
gnc_settings_dump_schema_paths ();

/* Run any data model changes for the backend before it's used
* by anyone */
gnc_gsettings_version_upgrade();
Expand Down

0 comments on commit a1d1751

Please sign in to comment.