Christopher Lam
655bddda46
[account.cpp] comparing identical accts returns 0
...
bypassing many comparisons
6 months ago
Christopher Lam
001c690a81
[account.cpp] gnc_account_foreach_split forward loops only
...
because the reverse iteration isn't used at all
6 months ago
Christopher Lam
99506779e3
Bug 799565 - Reconcile date default doesn't update to reflect previous reconciliation.
...
A one-word path error in xaccAccountClearReconcilePostpone.
The commit 9172d1dd23 accidentally reverted in 90662d72a2 , reapply
1 year ago
John Ralls
90662d72a2
xaccAccountDeleteAllTransactions: Avoid UAF crashes
...
Chris Lam pointed out that the original algo would crash if a
transaction had more than one split in the account being deleted.
Deduplicate the transaction vector first to protect against that.
Also suspend qof events for a 4x speedup.
1 year ago
John Ralls
9172d1dd23
Bug 799565 - Reconcile date default doesn't update to reflect…
...
previous reconciliation.
A one-word path error in xaccAccountClearReconcilePostpone.
1 year ago
John Ralls
bc7fafd4ad
Bug 799528 - Crash on account deletion (edit)
...
New function xaccAccountDeleteAllTransactions.
Delete all transactions before deleting the account; simply deleting the
splits during account destruction isn't safe. In the particular case of an
imbalance account the transaction commit after deleting a split just makes
a new one.
1 year ago
Alex Aycinena
d0ad95fe92
Correct bug introduced in commit 63deaad. affecting Edit->Tax Report Options and the US Income Tax Report
1 year ago
Christopher Lam
f6c73b15fb
use gnc_account_get_all_parents and std::mismatch
1 year ago
Christopher Lam
a2d7868dce
[Account.hpp] gnc_account_get_all_parents returns reversed path vector
1 year ago
Christopher Lam
c02152b34a
[Account.hpp] xaccAccountGetSplits returns a reference to vector
2 years ago
Christopher Lam
10857219ab
[Account.cpp] refactor acc->balance_limit getters/setters
2 years ago
Christopher Lam
63deaad249
[Account.cpp] use newer qof_instance_get|set_path_kvp
...
which do not require GValue dance
small modification of xaccAccountSetLastNum behaviour with
empty-string last_num
2 years ago
Christopher Lam
ecabcef084
[Account.cpp] small modification xaccAccountSetLastNum
...
if last-num is empty-string, remove the slot. this makes the behaviour
consistent with other slots.
2 years ago
Christopher Lam
d13f930a8c
[Account.cpp] tightening loops, less g_list_free
2 years ago
John Ralls
514793d7a0
Bug 799389 - Crash when removing an account
...
Destroying the split vector from front->back crashes halfway through
because the iterators aren't updated as we remove items from the
vector. Iterating in reverse works because the remaining elements
aren't moved as we delete.
2 years ago
Christopher Lam
48f3842eaa
[Account.cpp] compare vectors with std::equal in xaccAccountEqual
2 years ago
John Ralls
5fe7a09e7d
Bug 799370 - Transaction Journal view cursor placement after commit to...
...
transaction change.
This also reverts commit 60ccca017 and fixes Bug 799347 in a different
way that avoids the problems found during the investigation of 799370
and reported on gnucash-user.
2 years ago
Christopher Lam
88d8f63853
[Account.cpp] overload gnc_account_foreach_descendant takes std::function
...
and separate account_foreach_descendant_sorted
2 years ago
John Ralls
60ccca017f
Bug 799347 - Edit account to make it sub account under other account
...
Send QOF_EVENT_REMOVE on the child before actually removing it from
the children vector so that the stored indexes are valid long enough
to clear them.
2 years ago
John Ralls
ad7a51a6ef
Merge Chris Lam's 'acc-children-vector' into stable.
2 years ago
Christopher Lam
b7fde90411
[Account.cpp] xaccAccountStagedTransactionTraversal copies SplitsVec
...
because create_transactions_for_instance which calls
xaccAccountStagedTransactionTraversal will modify the splits
2 years ago
Christopher Lam
cd097d19ec
[Account.cpp] don't copy SplitsVec
2 years ago
Christopher Lam
d1807b6c15
[engine.i] move gnc_accounts_and_all_descendants to engine.i
2 years ago
Christopher Lam
6cac9d0ebb
[Account.cpp] priv->children is a vector<Account*>
2 years ago
Christopher Lam
e80249ce2b
[Account.cpp] gnc_account_remove_split shortcuts removing last split
...
this speeds up book shutdown which empties the account splits in
reverse chrono order.
2 years ago
Christopher Lam
038405b370
Revert "[account.cpp] gnc_account_remove_split searches from the end"
...
This reverts commit 5aff4fb57d . Was not
tested properly...
2 years ago
Christopher Lam
5aff4fb57d
[account.cpp] gnc_account_remove_split searches from the end
...
because removing the latest split is far more common (e.g. from ui or
during book shutdown) than removing an early split.
2 years ago
Christopher Lam
7b46466ebd
[account.cpp] fix regression caused by 3f7a5a8267
...
whereby deleting an account and moving all splits to another account
would segfault. make a copy of priv->splits and work on the copy
rather than the original.
2 years ago
Christopher Lam
e54e9d8086
[account.cpp] use HashTable for splits
...
reduces xml loading time from 3.5s to 3.1s, i.e. 11% improvement
2 years ago
Christopher Lam
b28ca9bdb4
use c++ placement new
...
to initialize non-c++ object members
2 years ago
Christopher Lam
1e1d21b716
[Transaction.hpp] rename to .hpp
2 years ago
Christopher Lam
87dbbf25f8
[account.cpp] add gnc_account_foreach_until_date
...
- uses binary search to find first split after date
- for_each from earliest split to (but excluding) the above first split
2 years ago
Christopher Lam
0f791c474a
[Account.cpp][api] gnc_account_foreach_split takes std::function<void(Split*)>
2 years ago
Christopher Lam
871f669a19
[Account.cpp] explicitly destroy priv->splits
...
better than 35b6fb767d
2 years ago
Christopher Lam
35b6fb767d
[Account.cpp] ensure priv->splits releases memory on shutdown
2 years ago
Christopher Lam
94368f4cb4
[Account.cpp] SplitsVec&, ensure xaccAccountGetSplitList is freed
2 years ago
Christopher Lam
2b71219766
[Account.cpp] remove obsolete comment
2 years ago
Christopher Lam
3f7a5a8267
[Account.hpp][API] xaccAccountGetSplits and gnc_account_find_split
2 years ago
Christopher Lam
a54caaab61
[Account.cpp] GetBalanceAsOfDate gets std::function instead of bool
2 years ago
Christopher Lam
c1ee59c39b
[Account.h] size_t xaccAccountGetSplitsSize returns g_list_length (splits)
...
which is easily replaced with vector.size()
2 years ago
Christopher Lam
2251bf8966
[Account.hpp] use std::optional for cached values
...
whereby {} denotes uncached values
2 years ago
Christopher Lam
d100df7ef7
[AccountP.hpp] .h -> .hpp, remove extern "C" {} wrapper
2 years ago
Christopher Lam
dab32807ef
[engine/*.cpp] NULL -> nullptr changes
...
It's the done thing
2 years ago
Christopher Lam
9782918586
[account.cpp] add more account metadata - assoc account
...
the tag denotes the type of associated account eg. "dividend"
"capgains" "cash" "fees"
2 years ago
Christopher Lam
235e24a055
[account.cpp] ~GncImapInfo = gnc_account_imap_info_destroy
3 years ago
Daniel Johnson
04b0317119
Demonstrate fx handling in budget report
3 years ago
Robert Fewell
0d84506a5e
Bug 798851 - Account Balance 'include subaccounts' not saved
...
The defaults for the account were removed by mistake in a previous
commit, added them back.
3 years ago
John Ralls
83829e6513
Merge branch 'maint'
3 years ago
John Ralls
1020bde89c
Fix crashes in test-engine on Arch Linux.
...
Root cause is mutating a list while it's iterating. We're able to
protect it in two cases, have to copy it in xaccTransScrubGainsDate.
3 years ago
Geert Janssens
d75ab275f1
Eliminate gnc-csv-account-map.[ch]
...
The code is was only used by the csv import assistant and forced
gtk as a dependency on gnc-imp-props-tx
Part has been moved to Account, other bits have
been moved to the importer code where they were
used.
3 years ago