Stefan Koch
6e9a20dfeb
Implement full test coverage of libgnucash/engine/qofid
...
NOTE: This does not have full coverage because the "if (!target || !ent)" body in the
collection_compare_cp function cannot be reached. There is too much safety in the rest of
the system to test this error.
NOTE: I made this a separate test from the test-engine so that I was able to check that it
by itself could test the full coverage of the qofid.cpp file. If it was part of the larger
test, I could have missed some parts that were covered incidentally elsewhere.
3 months ago
Stefan Koch
a2cc9881df
Explicitly set the is_dirty attribute in qof_collection_new
...
It is likely that the memory was zeroed anyway, but the explicitness makes it easier to read.
3 months ago
Stefan Koch
9079d87307
Remove unused qof_collection_from_glist function.
3 months ago
Robert Fewell
b5185e1823
Bug 799706 - Rename Namespace
...
Add a rename namespace button to the Security editor that is enabled by
the selection of a namespace row in the tree view.
4 months ago
Christopher Lam
c3e4f374a9
[account.cpp] gnc_account_child_index non-child acct should return -1
...
bugfix from 6cac9d0ebb
4 months ago
John Ralls
be46171d02
Turn of deprecation warning for wstring_convert.
...
Deprecated in C++17, no replacement until C++26.
4 months ago
John Ralls
942313d099
GncDateTime: New exceptions and a 32-bit time_t problem.
...
Boost::date_time has changed to throwing a std::out_of_range instead of a
boost::date_time::gregorian::bad_year when a date is outside of the
1400-9999 year range it can deal with.
We also recently discovered that it will use the system localtime function
when creating a new date which can lead to a 2038 failure. Use std::chrono
to resolve that problem.
4 months ago
John Ralls
3a06602910
Fix Asan UB complaint about int64_t alignment.
...
by doing endian_swap on the aligned local instead of the unaligned bytes of the memory mapped file.
4 months ago
John Ralls
34330c2a57
gncTaxTable: chain up to the correct parent function.
4 months ago
Bruce Schuck
f055c3c5a4
Added US Bonds (usbonds) to gnc-commodity.cpp
...
New Finance::Quote module to get prices for series E, EE, or I bonds
5 months ago
Christopher Lam
c80234341c
[gnc-euro.cpp] fix typo for bulgarian lev rate
5 months ago
Christopher Lam
349c208a6c
[guid.cpp] GncGUID* avoids temporary gnc::GUID, and better hash
5 months ago
John Ralls
6907d3648a
Bulgarian Lev (BGN) replaced by Euro 1 Jan 2026.
5 months ago
Christopher Lam
722a455593
[guid.cpp] string->guid should disallow 'g' char
...
off-by-1 error in alpha test. only 'a'-'f' should be allowed.
5 months ago
Christopher Lam
1cfda5a71a
[test-gnc-guid.cpp] use EXPECT_THROW
...
instead of try..catch
5 months ago
Christopher Lam
cdb9dfa0ee
[guid.cpp] fast_string_to_guid: -1<<4 is UB, fix UB
...
when parsing invalid chars, hi|lo would return -1. convert to unsigned
to avoid UB.
5 months ago
Christopher Lam
3e4e334944
[guid.cpp] string->guid: parse into uuid data, avoids memcpy
5 months ago
Christopher Lam
534bea748f
[guid.cpp] Specialise guid<->32-byte string
...
- string->guid has branch-lite unrollable loop, fallback to slow
boost parser
- guid->string uses lookup table
- avoids creating several temporary heap-allocated std::strings
5 months ago
Christopher Lam
3c5a1801e2
[guid.cpp] fix guid==nullptr comparison retvals
...
- if guid_1 guid_2 are both null they should return int(0) or bool(true)
5 months ago
John Ralls
7e5f559724
Merge Christian Wehling's 'improve_strings' into stable.
5 months ago
Christopher Lam
7c7c8b0992
[gnc-pricedb.cpp] plug leak when fiscal_end_date is null
...
fiscal_end_date was assigned g_date_new but never freed. merge with
invalid fiscal_end_date too.
5 months ago
Christopher Lam
04af7b5fa6
[qofobject.cpp] check col!=nullptr instead of obj
...
because obj was already verified non-nullptr a few lines prior. this
logic error present since original qofobject.c
5 months ago
Christopher Lam
7bdf31f9d3
[gnc-date.cpp] gnc_g_date_new_today calls gnc_gdate_set_today
...
instead of vice-versa.
- avoids malloc/free in gnc_gdate_set_today
- avoids unnecessary dmy->julian->dmy(*) conversion
(*) the GDate is typically used by gdate_to_time64 which performs a
julian->dmy conversion, and this is now avoided
6 months ago
Christopher Lam
2119fceb3a
[transaction.cpp] xaccTransSetDate has GDate on stack
...
avoid malloc/free
6 months ago
Christopher Lam
dde10464d1
[transaction.cpp] comparing identical txns returns 0
...
bypassing many comparisons
6 months ago
Christopher Lam
655bddda46
[account.cpp] comparing identical accts returns 0
...
bypassing many comparisons
6 months ago
Christopher Lam
001c690a81
[account.cpp] gnc_account_foreach_split forward loops only
...
because the reverse iteration isn't used at all
6 months ago
Bruce Schuck
7cc6871d7f
Removed China Merchants Bank from quote sources.
...
The Finance::Quote module is no longer working and will be removed
in the next release.
6 months ago
Christopher Lam
5dad327f47
[qoflog.cpp] plug a gchar* leak
7 months ago
Christopher Lam
c8348fa4cf
[translog.cpp] use c++ for better cleanup
7 months ago
John Ralls
ebcd670ab5
Merge Bruce Schuck's 'addswissfundata' into stable.
7 months ago
John Ralls
dcb7a8c242
Fix GncDateTime tests on Windows.
8 months ago
John Ralls
6fab138647
Adjust tests to accommodate Win32 special cases.
8 months ago
Sherlock
048dfa1232
Bug 343711 - Splits to Imbalance-USD do not disappear when zero-valued.
...
To mitigate potential impact, the Imbalance split is only removed when the split transitions to zero value during the commit of the transaction and the split's memo and action have no value.
8 months ago
Bruce Schuck
bd440d9eff
Added Swiss Fund Data AG to single_quote_sources.
...
New F::Q source will be available in v1.67.
8 months ago
John Ralls
a773248939
Bug 799649 - Ensure that GnuCash does not crash when it converts a...
...
foreign-currency transaction into a trading account transaction.
Disable scrubbing while committing the new trading split, otherwise
the recursed scrub will delete it causing a crash when GnuCash tries
to populate it.
9 months ago
Christopher Lam
368b74c69c
[gnc-pricedb.cpp] plug leak from gnc_g_date_new_today
10 months ago
Christopher Lam
f3f917df38
[Transaction.cpp] use qof_instance kvp API for GDate
10 months ago
Christopher Lam
ab04715c91
[Transaction.cpp] use qof_instance kvp API for Time64, with bugfix
...
fixes bug whereby xaccTransRetDateDue returns 0 if the kvp time64
stored is 0.
10 months ago
Christopher Lam
985f591830
[Transaction.cpp] small modification to xaccTransSetNotes
10 months ago
Christopher Lam
7e740babdf
[Transaction.cpp] small modification to xaccTransSetReadOnly
...
if reason is "" then remove the kvp
10 months ago
Christopher Lam
23a2e091c7
[Transaction.cpp] use qof_instance kvp API for const char*
10 months ago
Christopher Lam
754a1eb42f
[utest-Account.cpp] use qof_instance kvp API for const char*
10 months ago
Christopher Lam
e48c293143
[Split.cpp] use qof_instance kvp API for GncGUID*
10 months ago
Christopher Lam
5fc64466a1
[Transaction.cpp] use qof_instance kvp API for GncGUID*
10 months ago
Christopher Lam
7e22685a1c
[Transaction.cpp] use qof_instance kvp API for int64_t
10 months ago
Christopher Lam
e28f314d43
[Split.cpp] use qof_instance kvp API for gnc_numeric
10 months ago
Christopher Lam
0cea3725a1
[Split.cpp] use qof_instance kvp API for const char*
10 months ago
Christopher Lam
ed4f72f3a7
[gnc-lot.cpp] use qof_instance kvp API for const char*
10 months ago
Christopher Lam
72869a393d
[gnc-commodity.cpp] use qof_instance kvp API for const char*
10 months ago