gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Jun 20 14:32:03 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/7381887b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/b514245c (commit)
	from  https://github.com/Gnucash/gnucash/commit/b331ec97 (commit)



commit 7381887bfcfbc46a54a8fc0438c6ffdbf1fd4a69
Merge: b331ec974e b514245c22
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jun 20 11:02:17 2023 -0700

    Merge Vincent Dawan's 'bug798952-counters' into stable.


commit b514245c228213f6713eb04e76141b6b89030f39
Author: Vincent Dawans <dawansv at gmail.com>
Date:   Mon Jun 19 19:23:04 2023 -0700

    Bug 798952 - Unable to set day threshold or counters in properties
    Make sure counter values are retrieved as int; allow counter back
    to zero; fix voucher default value.

diff --git a/libgnucash/engine/gnc-optiondb.cpp b/libgnucash/engine/gnc-optiondb.cpp
index 97a5286fe1..11ad68ac47 100644
--- a/libgnucash/engine/gnc-optiondb.cpp
+++ b/libgnucash/engine/gnc-optiondb.cpp
@@ -547,7 +547,7 @@ GncOptionDB::load_from_kvp(QofBook* book) noexcept
                             set_double();
                             break;
                         case KvpValue::Type::INT64:
-                            option.set_value(kvp->get<int64_t>());
+                            option.set_value(static_cast<int>(kvp->get<int64_t>()));
                             break;
                         case KvpValue::Type::STRING:
                             fill_option_from_string_kvp(option, kvp);
@@ -889,7 +889,7 @@ gnc_register_counter_option(GncOptionDB* db, const char* section,
                             const char* doc_string, int value)
 {
     GncOption option{GncOptionRangeValue<int>{section, name, key, doc_string,
-                value, 1, 999999999, 1}};
+                value, 0, 999999999, 1}};
     option.set_alternate(true);
     db->register_option(section, std::move(option));
 }
@@ -1205,7 +1205,7 @@ gnc_option_db_book_options(GncOptionDB* odb)
     gnc_register_counter_option(odb, counter_section,
                                 N_("Expense voucher number"), "gncExpVouchera",
                                 N_("The previous expense voucher number generated. This number will be incremented to generate the next voucher number."),
-                                0LL);
+                                0);
     gnc_register_counter_format_option(odb, counter_section,
                                        N_("Expense voucher number format"),
                                        "gncExpVoucherb",



Summary of changes:
 libgnucash/engine/gnc-optiondb.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



More information about the gnucash-changes mailing list