From 9079d87307c3a1b7e7d33c64c8ed30ebe7c29d7c Mon Sep 17 00:00:00 2001 From: Stefan Koch Date: Thu, 15 Jan 2026 08:41:35 -0500 Subject: [PATCH] Remove unused qof_collection_from_glist function. --- libgnucash/engine/qofid.cpp | 20 -------------------- libgnucash/engine/qofid.h | 13 ------------- 2 files changed, 33 deletions(-) diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp index 78fefff1df..2d3bf402e6 100644 --- a/libgnucash/engine/qofid.cpp +++ b/libgnucash/engine/qofid.cpp @@ -220,26 +220,6 @@ qof_collection_lookup_entity (const QofCollection *col, const GncGUID * guid) return ent; } -QofCollection * -qof_collection_from_glist (QofIdType type, const GList *glist) -{ - QofCollection *coll; - QofInstance *ent; - const GList *list; - - coll = qof_collection_new(type); - for (list = glist; list != NULL; list = list->next) - { - ent = QOF_INSTANCE(list->data); - if (FALSE == qof_collection_add_entity(coll, ent)) - { - qof_collection_destroy(coll); - return NULL; - } - } - return coll; -} - guint qof_collection_count (const QofCollection *col) { diff --git a/libgnucash/engine/qofid.h b/libgnucash/engine/qofid.h index 8a6f6157fa..b3eabbdf45 100644 --- a/libgnucash/engine/qofid.h +++ b/libgnucash/engine/qofid.h @@ -203,19 +203,6 @@ not in the other. gint qof_collection_compare (QofCollection *target, QofCollection *merge); -/** \brief Create a secondary collection from a GList - -@param type The QofIdType of the QofCollection \b and of - \b all entities in the GList. -@param glist GList of entities of the same QofIdType. - -@return NULL if any of the entities fail to match the - QofCollection type, else a pointer to the collection - on success. -*/ -QofCollection* -qof_collection_from_glist (QofIdType type, const GList *glist); - /** @} */ /** @} */