Skip to content

Commit

Permalink
[gnc-quotes.cpp] remove sources_as_glist()
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Feb 17, 2024
1 parent 346499a commit 770045c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
16 changes: 0 additions & 16 deletions libgnucash/app-utils/gnc-quotes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ class GncQuotesImpl

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;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions libgnucash/app-utils/gnc-quotes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@ class GncQuotes
*/
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.
Expand Down

0 comments on commit 770045c

Please sign in to comment.