Christian Stimming
eb9e45bc20
Sorting speed-up: Cache the bool value of Transaction's is_closing property.
...
This value is queried on each comparison of split or txn sort function,
which means it is called quite a lot. Avoiding the KVP lookup of this
property gains a lot in terms of CPU cycles.
7 years ago
Robert Fewell
2634f23f87
Bug 767772 - Associated file with transaction is lost
...
when moving entry between accounts
When using the cut transaction option the 'associated file' value was
not being pasted to the new transaction. Added scheme code to get this
value and save it to new transaction when using 'cut/copy' and then
'paste' operations. When using the duplicate option, a dialogue allows
you to keep the copied association or not. It does not get copied for
autocomplete.
7 years ago
John Ralls
4ffeb3efac
Ensure that a dereferenced variable isn't NULL.
...
Found by clang static analyzer.
7 years ago
Geert Janssens
11af81b51b
Bug 789674 - Close Book tool regression
7 years ago
Robert Fewell
d458e13a7f
Remove KVP for assoc_uri when passed an empty string
...
Change xaccTransSetAssociation so if an empty string is passed the KVP
entry is removed instead of leaving an empty stub.
7 years ago
John Ralls
284d6c1456
Fix travis failure try 2.
...
stdint.h for Transaction.c too.
Also get rid of unused timeval decl.
7 years ago
John Ralls
710b122b24
Bug 796940 - Invalid transaction date-posted KVP causes...
...
date-posted to not be saved.
Check the stored GDate for being in the GncDateTime range as well
as the GDate range before returning it and check trans->date-posted
against INT64_MAX instead of 0 before changing it.
7 years ago
Di Mang
893383ce9b
removing double semicolons at the end of lines
8 years ago
Geert Janssens
4e71629966
Fix memory leak in xaccTransRetDateDue
8 years ago
Geert Janssens
1117027f72
An empty GValue is interpreted as NULL reason, which is still a valid cache
...
Ignoring this would make caching almost useless as there are typically
only very few read-only transactions.
8 years ago
John Ralls
a19dcc7bd4
Fix crash when there's no TRANS_READ_ONLY_REASON slot.
...
Unsetting an empty g_value raises a fatal error, causing tests to fail
in some environments.
g_free() handles NULLs itself, no need to protect it.
8 years ago
Geert Janssens
d069b67d48
Fix memory leak in xaccTransGetReadOnly
...
In addition implement a cache for this value as suggested in the comments
as this function is called on every transaction commit.
8 years ago
John Ralls
358cd979d9
Remove Timespec from the main engine classes (Transaction, Split, & Account.
8 years ago
John Ralls
c8b372e390
Convert GNC_TYPE_TIMESPEC to GNC_TYPE_TIME64, Kvp::Type::Timespec to Kvp::Type::Time64
...
They have to go together because of using gvalues to hide KVP from most of
GnuCash.
8 years ago
Geert Janssens
c71204628d
Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file
8 years ago
John Ralls
6b49b3ba4c
Bug 792763 - deleting a transaction can cause a SIGSEGV
...
Prevent a NULL transaction from crashing xaccTransCountSplits and
prevent gnc_plugin_business_update_menus from calling it with a
NULL transaction.
8 years ago
lmat
1f050fd1e5
Transaction members Timespec->time64
8 years ago
lmat
9a86dd222b
gncInvoice uses time64
8 years ago
lmat
f77369bb96
Removing timspec from some xml parsing
...
And several other sprawling references that are connected in one
way or another.
8 years ago
lmat
588fcb6ed2
Transaction getVoidTime uses time64.
8 years ago
lmat
b5aad8c7bb
Renaming time64 function for consistency
8 years ago
lmat
61d4aaaf08
Adding some time64 alternatives
8 years ago
lmat
ee56f5df78
Adding some time64 API functions
8 years ago
John Ralls
a6a46d7cdc
Test struct tm* returns from gnc_gmtime and gnc_localtime
...
To ensure that we don't crash for dereffing a nullptr.
8 years ago
lmat
805549ba24
Rename qofinstance function
...
This function was supposed to be renamed a while back. I had named it
this way for debugging purposes.
8 years ago
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.
8 years ago
John Ralls
aeb2e65ff1
Fix posted-date scrub incrementing the day in central pacific timezones.
8 years ago
Geert Janssens
0dfb921e86
Add functions to retrieve a copy of splits of a certain type from business transactions
8 years ago
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.
9 years ago
John Ralls
f7ce8bcbb3
Disable creating a date string to maybe use in a PINFO message.
...
Creating a date string occupied nearly all of the time required to
set a date on a transaction, generally to no benefit at all.
9 years ago
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.
9 years ago