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.
The QofQuery param_list is a GSList of const char*. Every SCM Query
would typically leak the GSList. This change will store the params
into the string cache, and the cached string is passed onto the
QofQuery param.
xaccSplitComputeCapGains creates gains_split pointers in both the Cap Gains Split and its Income split to the original split, but the original's gains_split pointer can point to only one of them, the Cap Gains split. When the original split is freed both the Cap Gains split's and its Income split need their gains_split pointers NULLed or when it's the Income split's turn to be freed it will try to deref the dangling pointer.
save_scm_value was trying too hard to handle the different possible
types that Scheme can set options to and in the process converting
lists to single symobls (e.g. ('good 'ugly) became #{good ugly}#.
That not being one of the possible values it was ignored and the
default value was used.
Why this compiled is a mystery. Since empty wasn't captured it should
have raised an unused variable for the outside the lambda declaration
and an undeclared variable for the use inside. Only gcc 7 raised the
first error and nothing noticed the second.
'reversed' each time you restart.
Lists read from the front, vectors to the back, so reverse the
vector after loading it.
While we're at it reserve enough elements to hold the list.
for certain reports.
Those reports being ones using complex options, apparently because
the callbacks weren't protected from Guile's garbage collector.
So replace the anyway ugly hack of a void* with a std::any wrapping
a class holding a std::unique_ptr with a custom deleter. The
constructor calls scm_gc_protect_object on the SCM containing the
callback and the custom deleter calls scm_gc_unprotect_object. The
copy constructor, required for std::any, makes a new std::unique_ptr
and calls scm_gc_protect_object again ensuring that the protect and
unprotect calls are symmetrical.
Meanwhile std::any hides the Guile dependency from all the classes
that don't need to know about it. The only ugliness is that there's
no good place to put a common implementation of SCNCallbackWrapper so it's
repeated in gnc-optiondb.i and dialog-options.cpp.
Store Number Range option values as a pair '(percentage . value) or '(pixels .
value) depending on the size of value as 4.x and earlier expect. When reading a
stored number range option handle the possibility that value is fixed
point (e.g. 50.0) as 4.x and earlier emit, avoiding a crash.
Instead of a gnc:split->owner, use gnc:make-split->owner instead which
generates a split->owner function with its own hashtable. This
function (and its hash table) will be garbage collected in due course,
triggering the gncOwnerFreeing of all owners.
This is a better approach than gnc:split->owner which maintains a
single hash table. It could be buggy: a report calls gnc:split->owner
to query a split, fails to reset its hashtable via #f; the split's
owner is assigned or modified, and the next call to gnc:split->owner
will return the incorrect cached owner.
Compatibility function for passing symbols or numbers as the default
value.
Note that this isn't used by GnuCash code and so isn't exercised or
tested, it's provided only to simplify user-written code migration.
Don't create a new book in the new-user dialog unless the user says to.
Don't automatically create a new book when retrieving default commodities
because the retrieve might be requested in a context like the Preferences
dialog when there is no book.
Some report tests relied on requesting the default commodity creating
the book, so in those tests ensure that the book is created first.