gnucash maint: GSettings - run data model transations while setting up
Geert Janssens
gjanssens at code.gnucash.org
Wed Sep 22 09:44:36 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/8ea52ae2 (commit)
from https://github.com/Gnucash/gnucash/commit/e1039b2d (commit)
commit 8ea52ae212cba24df25c5a640e81581d06ed1174
Author: Geert Janssens <geert at kobaltwit.be>
Date: Wed Sep 22 15:44:30 2021 +0200
GSettings - run data model transations while setting up
This makes sure all schema changes are in effect before
the first consumer can query them. For example this will
prevent a one-time re-occurrence of the tip of the day dialog
the first time the new migrations are run.
diff --git a/gnucash/gnucash.cpp b/gnucash/gnucash.cpp
index 2ab37cb00..1be769bfb 100644
--- a/gnucash/gnucash.cpp
+++ b/gnucash/gnucash.cpp
@@ -145,9 +145,6 @@ scm_run_gnucash (void *data, [[maybe_unused]] int argc, [[maybe_unused]] char **
scm_set_current_module(main_mod);
scm_c_use_module("gnucash app-utils");
- /* Check whether the settings need a version update */
- gnc_gsettings_version_upgrade ();
-
gnc_gnome_utils_init();
gnc_search_core_initialize ();
gnc_hook_add_dangler(HOOK_UI_SHUTDOWN, (GFunc)gnc_search_core_finalize, NULL, NULL);
diff --git a/libgnucash/app-utils/gnc-gsettings.cpp b/libgnucash/app-utils/gnc-gsettings.cpp
index 6e8bb9bd7..9288f6f51 100644
--- a/libgnucash/app-utils/gnc-gsettings.cpp
+++ b/libgnucash/app-utils/gnc-gsettings.cpp
@@ -627,6 +627,10 @@ void gnc_gsettings_load_backend (void)
prefsbackend->block_all = gnc_gsettings_block_all;
prefsbackend->unblock_all = gnc_gsettings_unblock_all;
+ /* Run any data model changes for the backend before it's used
+ * by anyone */
+ gnc_gsettings_version_upgrade();
+
LEAVE("Prefsbackend bind = %p", prefsbackend->bind);
}
Summary of changes:
gnucash/gnucash.cpp | 3 ---
libgnucash/app-utils/gnc-gsettings.cpp | 4 ++++
2 files changed, 4 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list