When the commodity table is registered, the current book will get
a default table assigned. When later setting the table explicitly
using qof_book_set_data() the exisiting table gets overwritten and
is thus leaked.
There is no way of removing or freeing a currency table from a book,
so the best we can do here is to set our own table on the book before
calling gnc_commodity_table_register().
If a function that returns an allocated pointer is passed directly into
something that does not take ownership of the pointer, the allocation is
leaked. This can be fixed by assigning the pointer to a new variable
and freeing it after operation on the memory.
The previous change of the delimiter between namespace and symbol
is needed in both overloads of GncQuoteImpl::query_fq.
Also log the query json string to ease future troubleshooting.
This fixes memory leaks that are only present in testing code.
Not very useful on itself, but it does make it easier to fix memory
leaks and other AddressSanitizer problems in actual gnucash code later.
Boost process wchar_t conversion chokes if it's fed an empty string.
This would happen when the user had no alphavantage key. Separate
the process invocation to not present the empty value to boost process.
When securities are in the list, the rows look twice as high as though
there is a linefeed at the end. This is partly due to commit for bug
797501 which worked at the time but a change in pango 50.4 to do with
wrapping has highlighted this bug.
To fix this only wrap currencies with ltr bidi isolate characters in
gnc_print_amount_with_bidi_ltr_isolate
Expose variations of xaccParseAmount and
xaccParseAmountExtended that will ignore the
automatic decimal point user preference.
This preference is really only useful for manual number
entering in the register.
The xaccParseAmountImport variant replaces xaccParseAmountPosSign
which was used exclusively by the csv importers.
Like xaccParseAmountPosSign, this replacement has the flag
to ignore or parse the positive number indicator.
Use ref-counting to manage GSettings object lifecycle
Use g_signal_handler_handlers_[un]block_matched to
block or unblock handlers rather than tracking them in
our own hash table.
Most getters and setters are identical with the exception of
the actual function to call into GSettings. Extract
boilerplate in two template functions and make all
getters/setters wrappers of these two functions.
Only cache GSettings objects we need to keep
track of callback functions.
This means a bit more overhead per GSettings
interaction, but as typical interactions are
only a few objects at once at best, this
overhead is unnoticeable.