Commit Graph

17 Commits

Author SHA1 Message Date
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
Richard Cohen
ea2d3be217 Remove some unused variables with obviously no side effects 2023-02-06 14:19:22 +00:00
Christopher Lam
17820ec261 Merge branch 'maint' 2023-01-26 18:40:44 +08:00
Richard Cohen
3360a6d13b Remove extra semicolons
Courtesy of gcc -pedantic
2023-01-24 13:22:18 +00:00
Robert Fewell
6a9ff287cd Wrap BillTermDecRef and TaxTableDecRef in test for shutdown
When Gnucash is shutting down, the TaxTables and BillTerms will be
destroyed/freed and may already have been so there is no point trying
to decrement a reference that is used to stop them being destroyed if
in use.
2021-08-14 15:09:33 +01:00
Robert Fewell
b421b3d2af Free Jobs for Customers and Vendors on book close 2021-08-12 16:07:31 +01:00
Simon Arlott
320df7e409
Use const return values for string cache
This is a prerequisite for being able to return "" (which is const) and
none of the returned values should ever be modified.
2021-07-11 18:54:49 +01:00
Christopher Lam
b2b8792110 prepend-and-reverse instead of O(N^2) append 2021-02-24 09:08:25 +08:00
Geert Janssens
073e47801d Drop useless ifdefs
The parameter it checks is always defined these days
2020-01-17 18:25:43 +01:00
Geert Janssens
d8a304c2c9 Housekeeping - reduce the number of PACKAGE and VERSION related cmake variables
This starts by setting the gnucash version number in the 'project' call.
This will result in a number of variables set by cmake. The remainder
of this commit is to reuse the auto-generated
PROJECT_NAME, PROJECT_VERSION, PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH and PROJECT_VERSION_TWEAK
instead of all the various instances of PACKAGE, GNUCASH_MAJOR_VERSION
and so on.

One parameter is worth mentioning - GETTEXT_PACKAGE
GnuCash is not using this directly (any more) but it has to be set before
including gi18n-lib.h.
2020-01-17 18:15:27 +01:00
John Ralls
c23f3f05e3 Fix deprecated G_TYPE_INSTANCE_GET_PRIVATE and G_INLINE_FUNC
with the function/declaration that they substituted.
Note that this doesn't use the recommended new GObject creation macros
because the class names in libgnucash/engine don't follow the gnome
naming convention.
2019-09-12 15:25:42 -07:00
John Ralls
606d9cfee6 Prevent potential nullptr dereference.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
Geert Janssens
3991ccb9c2 Cache current owner balances
These are queried continuously by the owner tree view (on Customer/Vendor/Employee
Overview pages) and recalculating them is an expensive operation.
The cache will be invalidated each time a lot reated to the owner
changes (modify or delete). The net effect is a huge responsiveness
improvement of said overviews in case of a large book.
2018-09-23 16:00:41 +02:00
lmat
805549ba24 Rename qofinstance function
This function was supposed to be renamed a while back. I had named it
this way for debugging purposes.
2017-12-21 07:39:33 -05:00
lmat
9d7ec35ce5 Removed qof_instance_set_kvp, qof_instance_get_kvp
And replaced them with versions that take lists of key path elements.
This is in an effort to eliminate the parsing of kvp keys.
2017-12-21 07:39:32 -05:00
Geert Janssens
1238b9d8cd Prevent gcc from searching config.h in the current directory
This will avoid a ninja-build from picking up a config.h generated by the autotools build
(in the root build directory). Picking up the wrong config.h may lead to all kinds of
subtle issues if the autotools run was done with different options than the cmake run.
2017-10-26 14:05:17 +02:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00