gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Thu Feb 2 19:31:01 EST 2023
Updated via https://github.com/Gnucash/gnucash/commit/7bb14b9c (commit)
via https://github.com/Gnucash/gnucash/commit/d4d5f269 (commit)
via https://github.com/Gnucash/gnucash/commit/f8fe461c (commit)
via https://github.com/Gnucash/gnucash/commit/d91d270a (commit)
via https://github.com/Gnucash/gnucash/commit/e3515185 (commit)
via https://github.com/Gnucash/gnucash/commit/351990cf (commit)
via https://github.com/Gnucash/gnucash/commit/dbdb5cb9 (commit)
via https://github.com/Gnucash/gnucash/commit/d8f45f24 (commit)
from https://github.com/Gnucash/gnucash/commit/12db8eaa (commit)
commit 7bb14b9caa86e25728fecf4fe9a91e710ac1e73b
Merge: d4d5f2697 d8f45f244
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Feb 2 14:32:14 2023 -0800
Merge Richard Cohen's 'use-reference-for-loop' into master
commit d4d5f269705b15bb75a2662e650dd058e7912a52
Merge: f8fe461cd e3515185d
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Feb 2 14:21:27 2023 -0800
Merge Richard Cohen's 'build-cleanup' into master
commit f8fe461cdf9a0933f0fb25357797f9eb01ac3b87
Merge: 12db8eaaf d91d270a7
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Feb 2 14:19:37 2023 -0800
Merge Richard Cohen's 'replace-deprecated-gtk' into master
commit d91d270a760cbec24d73a49170e8d47cf4586e54
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Tue Jan 31 15:01:30 2023 +0000
Replace deprecated (since 2.38) g_simple_action_group_lookup
with g_action_map_lookup_action
diff --git a/gnucash/gnome/window-reconcile.c b/gnucash/gnome/window-reconcile.c
index 42bbec13c..79ec1e1e9 100644
--- a/gnucash/gnome/window-reconcile.c
+++ b/gnucash/gnome/window-reconcile.c
@@ -2176,7 +2176,7 @@ recn_destroy_cb (GtkWidget *w, gpointer data)
//Disable the actions, the handlers try to access recnData
for (gint i = 0; i < num_actions; i++)
{
- GAction *action = g_simple_action_group_lookup (recnData->simple_action_group, actions[i]);
+ GAction *action = g_action_map_lookup_action (G_ACTION_MAP(recnData->simple_action_group), actions[i]);
g_simple_action_set_enabled (G_SIMPLE_ACTION(action), FALSE);
}
g_strfreev (actions);
commit e3515185d3f915a7b733eb042ecf1fa1d4c0c14e
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Tue Jan 31 15:59:05 2023 +0000
Make the cmake command lowercase
diff --git a/common/test-core/CMakeLists.txt b/common/test-core/CMakeLists.txt
index 75cd39a5c..2e8501ea6 100644
--- a/common/test-core/CMakeLists.txt
+++ b/common/test-core/CMakeLists.txt
@@ -8,7 +8,7 @@ set(test_core_noinst_HEADERS
unittest-support.h
)
-INCLUDE_DIRECTORIES(
+include_directories(
${CMAKE_BINARY_DIR}/common
${CMAKE_SOURCE_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/engine
commit 351990cf47b62d3f28f0e8ee7857e84c50aed1ec
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Tue Jan 31 16:17:27 2023 +0000
Remove unused GNOME cmake flags
There are no longer any Gnome dependencies
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 727846aab..04800ccf6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,7 +54,6 @@ option (ENABLE_BINRELOC "compile with binary relocation support" ON)
option (DISABLE_NLS "do not use Native Language Support" OFF)
option (DISABLE_DEPRECATED_GLIB "don't use deprecated glib functions" OFF)
option (DISABLE_DEPRECATED_GTK "don't use deprecated gtk, gdk or gdk-pixbuf functions" OFF)
-option (DISABLE_DEPRECATED_GNOME "don't use deprecated gnome functions" OFF)
# ############################################################
# These are also settable from the command line in a similar way.
@@ -773,9 +772,6 @@ set(PLATFORM_OSX 1)
set(HAVE_OSX_KEYCHAIN 1)
endif()
-if(DISABLE_DEPRECATED_GNOME)
-set(GNOME_DISABLE_DEPRECATED 1)
-endif()
if(DISABLE_DEPRECATED_GTK)
set(GTK_DISABLE_DEPRECATED 1)
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index 70602ef7b..722fb6345 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -43,12 +43,6 @@
/* Microsoft Windows OS */
#cmakedefine GNC_PLATFORM_WINDOWS 1
-/* using GNOME */
-#cmakedefine GNOME
-
-/* Don't use deprecated gnome functions */
-#cmakedefine GNOME_DISABLE_DEPRECATED
-
/* GnuCash build identification, which defaults to a description of the vcs
commit from which gnucash is built. Distributions may want to insert a
package management based version string instead. */
commit dbdb5cb9d15e9e491073ce67e4e389d7e369c1d7
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Tue Jan 31 15:34:19 2023 +0000
Remove unused GNUCASH_LATEST_STABLE_SERIES
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c099cfecb..727846aab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,9 +11,6 @@ project (gnucash
enable_testing()
-# Version number of gnucash
-set (GNUCASH_LATEST_STABLE_SERIES 3.x)
-
set (PACKAGE_NAME GnuCash)
set (PACKAGE_BUGREPORT "https://bugs.gnucash.org")
set (PACKAGE_STRING "${PACKAGE_NAME} ${PROJECT_VERSION}")
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index 3e357b2e1..70602ef7b 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -54,9 +54,6 @@
package management based version string instead. */
#define GNUCASH_BUILD_ID "@GNUCASH_BUILD_ID@"
-/* Most recent stable GnuCash series */
-#define GNUCASH_LATEST_STABLE_SERIES "@GNUCASH_LATEST_STABLE_SERIES@"
-
/* GnuCash earliest compatible databaseversion number */
#define GNUCASH_RESAVE_VERSION @GNUCASH_RESAVE_VERSION@
commit d8f45f2443391eebb02a7b28b509c610464c6a19
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Tue Jan 31 14:43:20 2023 +0000
Use const references for for-loops to avoid unnecessary copies
Found by clazy - clazy-range-loop-reference
diff --git a/gnucash/gnome/dialog-report-column-view.cpp b/gnucash/gnome/dialog-report-column-view.cpp
index f23854d8c..12e9a31a0 100644
--- a/gnucash/gnome/dialog-report-column-view.cpp
+++ b/gnucash/gnome/dialog-report-column-view.cpp
@@ -146,7 +146,7 @@ update_available_lists(gnc_column_view_edit * view)
auto store = GTK_LIST_STORE(model);
gtk_list_store_clear(store);
- for (auto guid : view->available_list)
+ for (const auto& guid : view->available_list)
{
auto rpt_guid{scm_from_utf8_string(guid.c_str())};
auto name =
diff --git a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
index 7b86adb2e..c6ff017c5 100644
--- a/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
+++ b/gnucash/import-export/csv-imp/assistant-csv-price-import.cpp
@@ -801,7 +801,7 @@ void CsvImpPriceAssist::preview_populate_settings_combo()
// Append the default entry
auto presets = get_import_presets_price ();
- for (auto preset : presets)
+ for (const auto& preset : presets)
{
GtkTreeIter iter;
gtk_list_store_append (GTK_LIST_STORE(model), &iter);
diff --git a/libgnucash/app-utils/gnc-quotes.cpp b/libgnucash/app-utils/gnc-quotes.cpp
index 1d75084e8..e0ade6500 100644
--- a/libgnucash/app-utils/gnc-quotes.cpp
+++ b/libgnucash/app-utils/gnc-quotes.cpp
@@ -154,7 +154,7 @@ m_version{}, m_sources{}, m_api_key{}
if (rv)
{
std::string err{bl::translate("Failed to initialize Finance::Quote: ")};
- for (auto err_line : errors)
+ for (const auto& err_line : errors)
err += err_line.empty() ? "" : err_line + "\n";
throw(GncQuoteSourceError(err));
}
@@ -427,13 +427,13 @@ get_quotes(const std::string& json_str, const std::unique_ptr<GncQuoteSource>& q
if (rv == 0)
{
- for (auto line : quotes)
+ for (const auto& line : quotes)
answer.append(line + "\n");
}
else
{
std::string err_str;
- for (auto line: errors)
+ for (const auto& line: errors)
{
if (line == "invalid_json\n")
PERR("Finanace Quote Wrapper was unable to parse %s",
@@ -831,7 +831,7 @@ get_commodity_data(const bpt::ptree& pt, const std::string& comm)
static void
show_quotes(const bpt::ptree& pt, const StrVec& commodities, bool verbose)
{
- for (auto comm : commodities)
+ for (const auto& comm : commodities)
{
auto comm_pt{get_commodity_data(pt, comm)};
@@ -854,7 +854,7 @@ static void
show_currency_quotes(const bpt::ptree& pt, const StrVec& commodities, bool verbose)
{
auto to_cur{commodities.front()};
- for (auto comm : commodities)
+ for (const auto& comm : commodities)
{
if (comm == to_cur)
continue;
diff --git a/libgnucash/backend/dbi/gnc-backend-dbi.cpp b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
index a616e9f0d..7a0601464 100644
--- a/libgnucash/backend/dbi/gnc-backend-dbi.cpp
+++ b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
@@ -178,7 +178,7 @@ UriStrings::quote_dbname(DbType t) const noexcept
static void
set_options(dbi_conn conn, const PairVec& options)
{
- for (auto option : options)
+ for (const auto& option : options)
{
auto opt = option.first.c_str();
auto val = option.second.c_str();
diff --git a/libgnucash/backend/sql/gnc-sql-backend.cpp b/libgnucash/backend/sql/gnc-sql-backend.cpp
index 9ca69b8a6..67ab0ca01 100644
--- a/libgnucash/backend/sql/gnc-sql-backend.cpp
+++ b/libgnucash/backend/sql/gnc-sql-backend.cpp
@@ -232,7 +232,7 @@ GncSqlBackend::ObjectBackendRegistry::load_remaining(GncSqlBackend* sql_be)
auto num_types = m_registry.size();
auto num_done = fixed_load_order.size() + business_fixed_load_order.size();
- for (auto entry : m_registry)
+ for (const auto& entry : m_registry)
{
std::string type;
GncSqlObjectBackendPtr obe = nullptr;
@@ -292,7 +292,7 @@ GncSqlBackend::load (QofBook* book, QofBackendLoadType loadType)
auto num_done = 0;
/* Load any initial stuff. Some of this needs to happen in a certain order */
- for (auto type : fixed_load_order)
+ for (const auto& type : fixed_load_order)
{
num_done++;
auto obe = m_backend_registry.get_object_backend(type);
@@ -302,7 +302,7 @@ GncSqlBackend::load (QofBook* book, QofBackendLoadType loadType)
obe->load_all(this);
}
}
- for (auto type : business_fixed_load_order)
+ for (const auto& type : business_fixed_load_order)
{
num_done++;
auto obe = m_backend_registry.get_object_backend(type);
@@ -903,7 +903,7 @@ GncSqlBackend::build_insert_statement (const char* table_name,
}
sql << ") VALUES(";
- for (auto col_value : values)
+ for (const auto& col_value : values)
{
if (col_value != *values.begin())
sql << ",";
diff --git a/libgnucash/core-utils/gnc-filepath-utils.cpp b/libgnucash/core-utils/gnc-filepath-utils.cpp
index 0123069b6..4f6db842f 100644
--- a/libgnucash/core-utils/gnc-filepath-utils.cpp
+++ b/libgnucash/core-utils/gnc-filepath-utils.cpp
@@ -701,7 +701,7 @@ static std::string migrate_gnc_datahome()
% gnc_userconfig_home.string().c_str();
migration_msg << std::endl;
- for (auto success_file : succeeded)
+ for (const auto& success_file : succeeded)
migration_msg << "- " << success_file << std::endl;
}
if (!conf_exist_vec.empty())
@@ -711,7 +711,7 @@ static std::string migrate_gnc_datahome()
"The following files have become obsolete and will be ignored:",
conf_exist_vec.size())
<< std::endl;
- for (auto obs_file : conf_exist_vec)
+ for (const auto& obs_file : conf_exist_vec)
migration_msg << "- " << obs_file << std::endl;
}
if (!failed.empty())
@@ -721,7 +721,7 @@ static std::string migrate_gnc_datahome()
"The following files could not be moved to {1}:",
failed.size())}) % gnc_userconfig_home.string().c_str()
<< std::endl;
- for (auto failed_file : failed)
+ for (const auto& failed_file : failed)
migration_msg << "- " << failed_file << std::endl;
}
diff --git a/libgnucash/engine/gnc-timezone.cpp b/libgnucash/engine/gnc-timezone.cpp
index c5ef090a2..7bbc92e85 100644
--- a/libgnucash/engine/gnc-timezone.cpp
+++ b/libgnucash/engine/gnc-timezone.cpp
@@ -775,6 +775,6 @@ TimeZoneProvider::get(int year) const noexcept
void
TimeZoneProvider::dump() const noexcept
{
- for (auto zone : m_zone_vector)
+ for (const auto& zone : m_zone_vector)
std::cout << zone.first << ": " << zone.second->to_posix_string() << "\n";
}
diff --git a/libgnucash/engine/qoflog.cpp b/libgnucash/engine/qoflog.cpp
index ffa2305f3..5bd9f8407 100644
--- a/libgnucash/engine/qoflog.cpp
+++ b/libgnucash/engine/qoflog.cpp
@@ -338,7 +338,7 @@ qof_log_check(QofLogModule domain, QofLogLevel level)
auto domain_vec = split_domain(domain);
- for (auto part : domain_vec)
+ for (const auto& part : domain_vec)
{
auto iter = std::find_if(module->m_children.begin(),
module->m_children.end(),
Summary of changes:
CMakeLists.txt | 7 -------
common/config.h.cmake.in | 9 ---------
common/test-core/CMakeLists.txt | 2 +-
gnucash/gnome/dialog-report-column-view.cpp | 2 +-
gnucash/gnome/window-reconcile.c | 2 +-
gnucash/import-export/csv-imp/assistant-csv-price-import.cpp | 2 +-
libgnucash/app-utils/gnc-quotes.cpp | 10 +++++-----
libgnucash/backend/dbi/gnc-backend-dbi.cpp | 2 +-
libgnucash/backend/sql/gnc-sql-backend.cpp | 8 ++++----
libgnucash/core-utils/gnc-filepath-utils.cpp | 6 +++---
libgnucash/engine/gnc-timezone.cpp | 2 +-
libgnucash/engine/qoflog.cpp | 2 +-
12 files changed, 19 insertions(+), 35 deletions(-)
More information about the gnucash-changes
mailing list