From f1c1fca023235a8563243529dd96a792d5ac057f Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Sun, 27 Dec 2020 12:46:52 +0800 Subject: [PATCH] [account.cpp][API] deprecate xaccAccountCountSplits --- libgnucash/engine/Account.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp index 5bcfe1a6c3..090e7d8370 100644 --- a/libgnucash/engine/Account.cpp +++ b/libgnucash/engine/Account.cpp @@ -3905,6 +3905,10 @@ xaccAccountCountSplits (const Account *acc, gboolean include_children) { gint64 nr, i; + PWARN ("xaccAccountCountSplits is deprecated and will be removed \ +in GnuCash 5.0. If testing for an empty account, use \ +xaccAccountGetSplitList(account) == NULL instead. To test descendants \ +as well, use gnc_account_and_descendants_empty."); g_return_val_if_fail(GNC_IS_ACCOUNT(acc), 0); nr = g_list_length(xaccAccountGetSplitList(acc));