[account.cpp][API] deprecate xaccAccountCountSplits

This commit is contained in:
Christopher Lam 2020-12-27 12:46:52 +08:00
parent bd7b77b900
commit f1c1fca023

View File

@ -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));