From 770045c4a5530244eb19056cb4c63b14f8c218f5 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Mon, 12 Feb 2024 10:44:52 +0800 Subject: [PATCH] [gnc-quotes.cpp] remove sources_as_glist() --- libgnucash/app-utils/gnc-quotes.cpp | 16 ---------------- libgnucash/app-utils/gnc-quotes.hpp | 7 ------- 2 files changed, 23 deletions(-) diff --git a/libgnucash/app-utils/gnc-quotes.cpp b/libgnucash/app-utils/gnc-quotes.cpp index d666a69b1e..1438050c80 100644 --- a/libgnucash/app-utils/gnc-quotes.cpp +++ b/libgnucash/app-utils/gnc-quotes.cpp @@ -103,7 +103,6 @@ public: const std::string& version() noexcept { return m_quotesource->get_version(); } const QuoteSources& sources() noexcept { return m_sources; } - GList* sources_as_glist (); bool had_failures() noexcept { return !m_failures.empty(); } const QFVec& failures() noexcept; std::string report_failures() noexcept; @@ -296,16 +295,6 @@ m_sources{}, m_book{book}, m_dflt_curr{gnc_default_currency()} m_sources = m_quotesource->get_sources(); } -GList* -GncQuotesImpl::sources_as_glist() -{ - GList* slist = nullptr; - std::for_each (m_sources.rbegin(), m_sources.rend(), - [&slist](const std::string& source) { slist = g_list_prepend (slist, g_strdup(source.c_str())); }); - return slist; -} - - void GncQuotesImpl::fetch (QofBook *book) { @@ -1081,11 +1070,6 @@ const QuoteSources& GncQuotes::sources() noexcept return m_impl->sources (); } -GList* GncQuotes::sources_as_glist () -{ - return m_impl->sources_as_glist (); -} - GncQuotes::~GncQuotes() = default; bool diff --git a/libgnucash/app-utils/gnc-quotes.hpp b/libgnucash/app-utils/gnc-quotes.hpp index 3e835e1843..5b40d76157 100644 --- a/libgnucash/app-utils/gnc-quotes.hpp +++ b/libgnucash/app-utils/gnc-quotes.hpp @@ -109,13 +109,6 @@ public: */ const QuoteSources& sources() noexcept; - /** Get the available Finance::Quote sources as a GList - * - * @return A double-linked list containing the names of the installed quote sources. - * @note the list and its contents are owned by the caller and should be freed with `g_list_free_full(list, g_free)`. - */ - GList* sources_as_glist () ; - /** Report if there were quotes requested but not retrieved. * * @returns True if there were quote failures.