1397 Commits
Author SHA1 Message Date
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.
2024-07-15 12:23:40 -07:00
Christopher Lam 88d8f63853 [Account.cpp] overload gnc_account_foreach_descendant takes std::function
and separate account_foreach_descendant_sorted
2024-07-12 17:54:17 +08:00
Christopher Lam 5f17334395 [transaction.cpp] use std::swap instead of SWAP macro 2024-07-09 20:09:24 +08:00
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.
2024-07-01 21:31:55 -07:00
John Ralls ad7a51a6ef Merge Chris Lam's 'acc-children-vector' into stable. 2024-06-27 13:21:49 -07:00
Robert Fewell 8bd7deb3dc Reapply filter when number of sub-accounts change
When viewing a register that displays sub-accounts, if the number of
sub-accounts is changed, the query is rebuilt from the remaining
sub-accounts but when a filter is being used it is not applied after.

Fixed by checking the original query for a filter and if so applying
that after query rebuilt.
2024-06-27 10:03:22 +01:00
Christopher Lam a6463f9814 [utest-Account] add more balance limit tests 2024-06-24 11:09:47 +08:00
Christopher Lam b7fde90411 [Account.cpp] xaccAccountStagedTransactionTraversal copies SplitsVec
because create_transactions_for_instance which calls
xaccAccountStagedTransactionTraversal will modify the splits
2024-06-18 20:29:14 +08:00
Christopher Lam cd097d19ec [Account.cpp] don't copy SplitsVec 2024-06-18 08:24:17 +08:00
Christopher Lam 119e257146 [Transaction|Split.cpp] Remove Reg2 unused functions 2024-06-17 21:53:26 +08:00
Christopher Lam 47791734bb [SX-ttinfo.cpp] tidier, using c++ stl and algo 2024-06-12 23:17:32 +08:00
Christopher Lam ddc7958801 [~qofchoice.cpp] remove, not useful
because the options GLists are populated, but are never actually
queried. The QOF_TYPE_CHOICE definition is moved to qofclass.h
2024-06-10 01:33:06 +08:00
Christopher Lam d1807b6c15 [engine.i] move gnc_accounts_and_all_descendants to engine.i 2024-06-07 18:10:40 +08:00
Christopher Lam 6cac9d0ebb [Account.cpp] priv->children is a vector<Account*> 2024-06-07 18:10:40 +08:00
Daniel Harding c4d44ea024 Bug 799324 - Invalid free in gvalue_from_kvp_value()
As of ddc3f28899, gvalue_from_kvp_value()
takes a GValue pointer from the caller, which in some cases points to
memory on the stack.  If that is the case and the code also hits the
default case in the switch statement, the unconditional g_slice_free()
call will attempt to free stack memory, causing the program to abort.

Fix by requiring the caller to always pass in a valid GValue pointer,
making the caller responsible for freeing it if necessary.  This also
means that it is no longer necessary for gvalue_from_kvp_value() to
return a value, so make it a void function.
2024-06-02 14:39:11 -07:00
Christopher Lam 6c7abb487d [SX-ttinfo.hpp] convert to c++ header 2024-06-01 12:03:34 +08:00
Christopher Lam 7dc2e2e6f9 [SchedXaction.cpp] use c++ algo 2024-06-01 11:45:41 +08:00
Christopher Lam 55592efe25 [SchedXAction.cpp] convert to c++ 2024-06-01 11:45:41 +08:00
Christopher Lam 109497d471 [SX-ttinfo.cpp] convert to c++ 2024-05-31 22:24:48 +08:00
Christopher Lam 5b1bb1186f [SX-book.cpp] convert to c++ 2024-05-31 22:06:55 +08:00
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.
2024-05-27 07:03:42 +08:00
Geert Janssens c816d2b34f Doxygen - minor cleanup of gnc-lot.h 2024-05-23 15:10:05 +02:00
Geert Janssens e8d72ad53f Doxygen - merge separate txt files into respective header files 2024-05-23 15:10:05 +02:00
Geert Janssens 6cd8e4e458 Doxygen - drop obvious cases of deprecated code 2024-05-23 15:10:05 +02:00
Geert Janssens da12a212c3 Drop old migration script to split qof from engine 2024-05-23 15:10:05 +02:00
Geert Janssens 39aa5f9c09 Remove texi design document in engine
It's extremely out of date and we no longer use it to keep track
of our design decisions and suggestions.

Only a section on KVP policy has been move into kvp_doc.txt
as it may make sense there.
2024-05-23 15:10:05 +02:00
Geert Janssens 58b4ee35f0 Doxygen - drop several txt files that were included in
docygen_mainpage.c

None of them had useful information describing actual
implementation concepts or details.
2024-05-23 15:10:05 +02:00
Geert Janssens 3c860737f1 Doxygen - fold business.txt file in the respective source files
The file mostly had short descriptions that were very similar
to the descriptions of business objects it referred to. The
exception was an explanation of how the billing terms and
tax tables handled their immutable copies. That bit has been
moved to its own group under the Business group and is referenced
from the BillTerm and TaxTables group.

This commit also fixes rendering of the Address doxygen info
and expands the BillTerm info to explain how proximo due dates
work.
2024-05-23 15:10:05 +02:00
Christopher Lam 038405b370 Revert "[account.cpp] gnc_account_remove_split searches from the end"
This reverts commit 5aff4fb57d. Was not
tested properly...
2024-05-21 22:58:00 +08:00
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.
2024-05-21 20:31:16 +08:00
Christopher Lam 370a06fb61 [qofid.cpp] remove unnecessary struct 2024-05-20 08:05:01 +08:00
Christopher Lam fe2cdf42c7 [transaction.cpp] speed up book close 2024-05-19 20:19:29 +08:00
Christopher Lam d21d6f9344 [qofid.cpp] qof_collection_foreach_sorted 2024-05-19 20:19:29 +08:00
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.
2024-05-13 12:45:56 +08:00
Christopher Lam e54e9d8086 [account.cpp] use HashTable for splits
reduces xml loading time from 3.5s to 3.1s, i.e. 11% improvement
2024-05-13 12:45:46 +08:00
Christopher Lam b28ca9bdb4 use c++ placement new
to initialize non-c++ object members
2024-05-12 21:00:56 +08:00
John Ralls 579da58a10 Merge Gwynn Ciesla's "Allow building with GCC 14.1" into stable. 2024-05-09 17:28:35 -07:00
Christopher Lam 2817ca195f [test-commodities.cpp] test stability of c_str names 2024-05-10 07:42:50 +08:00
Christopher Lam f67233b662 Bug 799305 - Crash when there is more than one unknown quote source for commodities
instead of vector which requires reallocation, use a c++ linked list.
2024-05-10 07:42:50 +08:00
Christopher Lam d867a9d18a Merge branch 'TransactionP-hpp' into stable #1928 2024-05-05 14:36:43 +08:00
Christopher Lam 9e4b03f71b [SplitP.hpp] rename to .hpp 2024-05-05 14:35:44 +08:00
Christopher Lam 1e1d21b716 [Transaction.hpp] rename to .hpp 2024-05-05 14:35:38 +08:00
Christopher Lam ef8afedd09 [gnc-euro.cpp] use c++isms 2024-05-05 09:28:32 +08:00
Christopher Lam 3bc7ce606d [gnc-euro.cpp] convert to c++ 2024-05-05 09:28:32 +08:00
Christopher Lam 80997ee5b4 [gtest-gnc-euro] add rounding test 2024-05-05 09:28:32 +08:00
Christopher Lam 949c9c97c0 Bug 799300 - Nullpointer exception in gnc_quote_source_s
avoids constructing std::string with nullptr
2024-05-04 08:27:43 +08:00
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
2024-05-02 22:21:31 +08:00
John Ralls 9c18bc889c Don't use Googletest internal API for unused decls. 2024-04-22 18:05:10 -07:00
Bruce P Schuck d01aad68fb Update gnc-commodity.cpp
Fool.pm not working. Removed references to it from sources JSON structures.
2024-04-22 18:05:10 -07:00
Bruce Schuck 6696bf0a41 Updated QuoteSourceVec to match F::Q v1.59 2024-04-22 18:05:10 -07:00