Commit Graph

2332 Commits

Author SHA1 Message Date
Christopher Lam
dc84e4d10c [gnc-pricedb.h] remove unused gnc_pricedb_substitute_commodity 2024-08-31 20:46:05 +08:00
Christopher Lam
1718fa0b6e [gnc-pricedb.h] remove unused gnc_pricedb_lookup_at_time64 2024-08-31 20:45:32 +08:00
Christopher Lam
a99491d034 [gnc-commodity.h] callers must free g_list
callers to gnc_commodity_namespace_get_commodity_list and
gnc_commodity_table_get_namespaces_list must free the GList.
2024-08-27 20:00:50 +08:00
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.
2024-08-19 12:59:17 -07:00
Christopher Lam
48f3842eaa [Account.cpp] compare vectors with std::equal in xaccAccountEqual 2024-08-18 19:46:07 +08:00
Christopher Lam
f65f877098 [Scrub.cpp] don't create intermediate GHashTable and GList
use unordered_set instead
2024-07-17 23:53:02 +08:00
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
Geert Janssens
bd6e79b4d6 Rework version-info rules to allow building from github downloaded zip archives 2024-06-08 18:06:45 +02: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
e8e179fd8f Drop remainder of files in libgnucash/doc
Relevant diagrams have been added in the wiki as png files.
The html files with financial calculations are copyrighted
by someone outside of the gnucash project. I'd rather not
add that info to the wiki. Similar information should be
easy to find on the internet.
2024-05-23 15:10:05 +02:00
Geert Janssens
387b4988e5 Move doxygen target and related files to toplevel.
Note: this also means the target directory changes from
      libgnucash/docs/html
      to
      [toplevel]/doxygen/html
2024-05-23 15:10:05 +02: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
d8ac86afd7 Integrate callgrind documentation into Hacking 2024-05-23 15:10:05 +02:00
Geert Janssens
cf7ff07624 Move libgnucash/doc/xml to libgnucash/backend/xml/DTD 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
891b921c81 Update doxygen.cnf file to more recent release 2024-05-23 15:10:05 +02:00
Geert Janssens
005112954c Some cleanup of the doxygen main page 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
48b9fa80ce Doxygen - strip obsolete info from loans.txt 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