gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Mon Feb 27 19:39:02 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/675d8941 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ca73b000 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9f068593 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/3d995de2 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/1b0af424 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/87c52f53 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/8e4c085e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ec169e6e (commit)
	from  https://github.com/Gnucash/gnucash/commit/3d5e2798 (commit)



commit 675d8941287cceb8183454915641ed9d45e844c2
Merge: ca73b0003 3d995de2a
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Feb 27 16:33:00 2023 -0800

    Merge Richard Cohen's 'cleanup-options' into master.


commit ca73b00039778903536ecf4302987de2877b5ed1
Merge: 3d5e27982 9f0685939
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Feb 27 16:31:53 2023 -0800

    Merge Richard Cohen's 'cleanup-boost' into master.


commit 9f068593900de5524c412d9eecd2ef9292ba9452
Author: Richard Cohen <richard at example.com>
Date:   Sun Oct 17 18:57:59 2021 +0100

    Remove references to old boost versions
    
    we already require 1.67

diff --git a/libgnucash/engine/kvp-value.hpp b/libgnucash/engine/kvp-value.hpp
index 515f69240..5ae494971 100644
--- a/libgnucash/engine/kvp-value.hpp
+++ b/libgnucash/engine/kvp-value.hpp
@@ -26,10 +26,7 @@
 
 #include <config.h>
 #include "qof.h"
-#include <boost/version.hpp>
-#if BOOST_VERSION == 105600
-#include <boost/type_traits/is_nothrow_move_assignable.hpp>
-#endif
+
 #include <boost/variant.hpp>
 
 //Must be a struct because it's exposed to C so that it can in turn be
diff --git a/libgnucash/engine/test/test-gnc-guid.cpp b/libgnucash/engine/test/test-gnc-guid.cpp
index 86baf9ea9..f31d3b99b 100644
--- a/libgnucash/engine/test/test-gnc-guid.cpp
+++ b/libgnucash/engine/test/test-gnc-guid.cpp
@@ -30,7 +30,6 @@
 #include <string>
 #include <iostream>
 #include <gtest/gtest.h>
-#include <boost/version.hpp>
 
 TEST (GncGUID, creation)
 {
@@ -79,12 +78,8 @@ TEST (GncGUID, from_string)
     {
         fail = true;
     }
-    /* Currently, boost uuid string parsing is mostly very permissive, but it has some
-     * odd pet peeves. See https://svn.boost.org/trac/boost/ticket/12253 for more.*/
-    if (BOOST_VERSION >= 106600)
-        EXPECT_TRUE (fail) << "Parsing the bogus string should throw";
-    else
-        EXPECT_FALSE (fail) << "Perhaps boost uuid is fixed.";
+
+    EXPECT_TRUE (fail) << "Parsing the bogus string should throw";
 }
 
 TEST (GncGUID, round_trip)

commit 3d995de2ab584036d7b96f7b3a6b2a6704d18591
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Wed Feb 15 19:32:19 2023 +0000

    Refactor: use default GncOptionValue copy constructor

diff --git a/libgnucash/engine/gnc-option-impl.cpp b/libgnucash/engine/gnc-option-impl.cpp
index 7da268f69..820e8e88a 100644
--- a/libgnucash/engine/gnc-option-impl.cpp
+++ b/libgnucash/engine/gnc-option-impl.cpp
@@ -912,20 +912,6 @@ operator>> (std::istream& iss, GncOptionCommodityValue& opt)
     return iss;
 }
 
-template GncOptionValue<bool>::GncOptionValue(const GncOptionValue<bool>&);
-template GncOptionValue<int>::GncOptionValue(const GncOptionValue<int>&);
-template GncOptionValue<int64_t>::GncOptionValue(const GncOptionValue<int64_t>&);
-template GncOptionValue<double>::GncOptionValue(const GncOptionValue<double>&);
-template GncOptionValue<char*>::GncOptionValue(const GncOptionValue<char*>&);
-template GncOptionValue<const char*>::GncOptionValue(const GncOptionValue<const char*>&);
-template GncOptionValue<std::string>::GncOptionValue(const GncOptionValue<std::string>&);
-template GncOptionValue<const QofQuery*>::GncOptionValue(const GncOptionValue<const QofQuery*>&);
-template GncOptionValue<const GncOwner*>::GncOptionValue(const GncOptionValue<const GncOwner*>&);
-template GncOptionValue<RelativeDatePeriod>::GncOptionValue(const GncOptionValue<RelativeDatePeriod>&);
-template GncOptionValue<uint16_t>::GncOptionValue(const GncOptionValue<uint16_t>&);
-template GncOptionValue<GncOptionAccountList>::GncOptionValue(const GncOptionValue<GncOptionAccountList>&);
-template GncOptionValue<GncMultichoiceOptionIndexVec>::GncOptionValue(const GncOptionValue<GncMultichoiceOptionIndexVec>&);
-template GncOptionValue<GncOptionReportPlacementVec>::GncOptionValue(const GncOptionValue<GncOptionReportPlacementVec>&);
 template void GncOptionValue<bool>::set_value(bool);
 template void GncOptionValue<int>::set_value(int);
 template void GncOptionValue<int64_t>::set_value(int64_t);
diff --git a/libgnucash/engine/gnc-option-impl.hpp b/libgnucash/engine/gnc-option-impl.hpp
index 302a2a291..fec6a5db7 100644
--- a/libgnucash/engine/gnc-option-impl.hpp
+++ b/libgnucash/engine/gnc-option-impl.hpp
@@ -91,11 +91,7 @@ public:
                    GncOptionUIType ui_type = GncOptionUIType::INTERNAL) :
         OptionClassifier{section, name, key, doc_string},
         m_ui_type(ui_type), m_value{value}, m_default_value{value} { }
-    GncOptionValue(const GncOptionValue& from) :
-        OptionClassifier{from.m_section, from.m_name, from.m_sort_tag,
-                         from.m_doc_string},
-        m_ui_type(from.get_ui_type()), m_value{from.get_value()},
-        m_default_value{from.get_default_value()}{}
+    GncOptionValue(const GncOptionValue&) = default;
     GncOptionValue(GncOptionValue&&) = default;
     GncOptionValue& operator=(const GncOptionValue&) = default;
     GncOptionValue& operator=(GncOptionValue&&) = default;

commit 1b0af4246a32ad1dbc0a692e4ef47d0887debb85
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Wed Feb 15 19:20:11 2023 +0000

    Refactor: remove extra template parameter from member functions

diff --git a/libgnucash/engine/gnc-option-impl.hpp b/libgnucash/engine/gnc-option-impl.hpp
index a473c994a..302a2a291 100644
--- a/libgnucash/engine/gnc-option-impl.hpp
+++ b/libgnucash/engine/gnc-option-impl.hpp
@@ -85,21 +85,21 @@ template <typename ValueType>
 class GncOptionValue : public OptionClassifier
 {
 public:
-    GncOptionValue<ValueType>(const char* section, const char* name,
-                              const char* key, const char* doc_string,
-                              ValueType value,
-                              GncOptionUIType ui_type = GncOptionUIType::INTERNAL) :
+    GncOptionValue(const char* section, const char* name,
+                   const char* key, const char* doc_string,
+                   ValueType value,
+                   GncOptionUIType ui_type = GncOptionUIType::INTERNAL) :
         OptionClassifier{section, name, key, doc_string},
         m_ui_type(ui_type), m_value{value}, m_default_value{value} { }
-    GncOptionValue<ValueType>(const GncOptionValue<ValueType>& from) :
+    GncOptionValue(const GncOptionValue& from) :
         OptionClassifier{from.m_section, from.m_name, from.m_sort_tag,
                          from.m_doc_string},
         m_ui_type(from.get_ui_type()), m_value{from.get_value()},
         m_default_value{from.get_default_value()}{}
-    GncOptionValue<ValueType>(GncOptionValue<ValueType>&&) = default;
-    GncOptionValue<ValueType>& operator=(const GncOptionValue<ValueType>&) = default;
-    GncOptionValue<ValueType>& operator=(GncOptionValue<ValueType>&&) = default;
-    ~GncOptionValue<ValueType>() = default;
+    GncOptionValue(GncOptionValue&&) = default;
+    GncOptionValue& operator=(const GncOptionValue&) = default;
+    GncOptionValue& operator=(GncOptionValue&&) = default;
+    ~GncOptionValue() = default;
     ValueType get_value() const { return m_value; }
     ValueType get_default_value() const { return m_default_value; }
     void set_value(ValueType new_value);

commit 87c52f53fa4e1969ca52194f579fc2afca33c0fe
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Mon Feb 27 11:33:10 2023 +0000

    Update some references to hello-world.scm

diff --git a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
index acc340fba..f20447ef5 100644
--- a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
+++ b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
@@ -1380,7 +1380,7 @@ public:
                                        (uint8_t)(color.red * 255),
                                        (uint8_t)(color.green * 255),
                                        (uint8_t)(color.blue * 255));
-// Hello World uses an old HTML4 attribute that doesn't understand alpha.
+// sample-report.scm uses an old HTML4 attribute that doesn't understand alpha.
         option.set_value(std::string{rgb_str});
         g_free(rgba_str);
         g_free(rgb_str);
diff --git a/libgnucash/engine/gnc-optiondb.cpp b/libgnucash/engine/gnc-optiondb.cpp
index 92e5a245f..98c98688f 100644
--- a/libgnucash/engine/gnc-optiondb.cpp
+++ b/libgnucash/engine/gnc-optiondb.cpp
@@ -741,7 +741,7 @@ gnc_register_list_option(GncOptionDB* db, const char* section,
     db->register_option(section, std::move(option));
 }
 
-/* Only balance-forecast.scm, hello-world.scm, and net-charts.scm
+/* Only balance-forecast.scm, sample-report.scm, and net-charts.scm
  * use decimals and fractional steps and they can be worked around.
  */
 template <typename ValueType> void

commit 8e4c085e9f6fa5c12359ddd7da23099eb98ca932
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Mon Feb 27 11:29:08 2023 +0000

    Fix memory leak

diff --git a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
index 687ff4566..acc340fba 100644
--- a/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
+++ b/gnucash/gnome-utils/gnc-option-gtk-ui.cpp
@@ -1383,6 +1383,7 @@ public:
 // Hello World uses an old HTML4 attribute that doesn't understand alpha.
         option.set_value(std::string{rgb_str});
         g_free(rgba_str);
+        g_free(rgb_str);
     }
 };
 

commit ec169e6e2469a2bad1b16ebf364dc8aa58bbdf1a
Author: Richard Cohen <richard at daijobu.co.uk>
Date:   Wed Feb 15 16:21:12 2023 +0000

    Fix some non-translatable typos

diff --git a/bindings/guile/gnc-optiondb.i b/bindings/guile/gnc-optiondb.i
index 77edfaff9..ac29b9132 100644
--- a/bindings/guile/gnc-optiondb.i
+++ b/bindings/guile/gnc-optiondb.i
@@ -1736,7 +1736,7 @@ gnc_register_multichoice_callback_option(GncOptionDBPtr& db,
         }
         catch (const std::invalid_argument& err)
         {
-            std::cerr <<"Account Sel Limited Option, value failed validation, option not creted.\n";
+            std::cerr <<"Account Sel Limited Option, value failed validation, option not created.\n";
             return nullptr;
         }
     }
@@ -1778,7 +1778,7 @@ gnc_register_multichoice_callback_option(GncOptionDBPtr& db,
         }
         catch (const std::invalid_argument& err)
         {
-            std::cerr <<"Date Option, value failed validation, option not creted.\n";
+            std::cerr <<"Date Option, value failed validation, option not created.\n";
             return nullptr;
         }
     }
diff --git a/libgnucash/engine/gnc-option-impl.hpp b/libgnucash/engine/gnc-option-impl.hpp
index 2fa0fa7c5..a473c994a 100644
--- a/libgnucash/engine/gnc-option-impl.hpp
+++ b/libgnucash/engine/gnc-option-impl.hpp
@@ -59,7 +59,7 @@ size_t constexpr sort_tag_size_max{10};
 #endif
 
 /** @struct OptionClassifier
- * This class is the parent of all option implmentations. It contains the
+ * This class is the parent of all option implementations. It contains the
  * elements that the optiondb uses to retrieve option values and that the
  * options dialog determines on which tab to place the option, in what order,
  * and what string to display as a tooltip.
@@ -150,7 +150,7 @@ private:
 };
 
 /** class GncOptionCommodityValue
- * Commodities are stored with their namespace and mnemonic instead of their gncGIUD
+ * Commodities are stored with their namespace and mnemonic instead of their gncGUID
  * so that they can be correctly retrieved even if they're deleted and recreated.
  * Additionally if GncOptionCommodityValue is created with GncOptionUIType::CURRENCY
  * it will throw std::invalid_argument if one attempts to set a value that isn't a
diff --git a/libgnucash/engine/gnc-optiondb-impl.hpp b/libgnucash/engine/gnc-optiondb-impl.hpp
index f6dbc169b..6febc36f0 100644
--- a/libgnucash/engine/gnc-optiondb-impl.hpp
+++ b/libgnucash/engine/gnc-optiondb-impl.hpp
@@ -52,7 +52,7 @@
 using GncOptionVec = std::vector<GncOption>;
 
 /** class GncOptionSection
- *  The upper-level classification implmentation. Contains the options for a
+ *  The upper-level classification implementation. Contains the options for a
  *  section; sections are displayed as separate tabs on the option dialog.
  */
 class GncOptionSection



Summary of changes:
 bindings/guile/gnc-optiondb.i             |  4 ++--
 gnucash/gnome-utils/gnc-option-gtk-ui.cpp |  3 ++-
 libgnucash/engine/gnc-option-impl.cpp     | 14 --------------
 libgnucash/engine/gnc-option-impl.hpp     | 26 +++++++++++---------------
 libgnucash/engine/gnc-optiondb-impl.hpp   |  2 +-
 libgnucash/engine/gnc-optiondb.cpp        |  2 +-
 libgnucash/engine/kvp-value.hpp           |  5 +----
 libgnucash/engine/test/test-gnc-guid.cpp  |  9 ++-------
 8 files changed, 20 insertions(+), 45 deletions(-)



More information about the gnucash-changes mailing list