John Ralls
579eed1fac
Bug 799480 - Fails to build with ICU 76
...
Use CMake find_package instead of pkg-config.
1 year ago
John Ralls
77a95b2d49
Silence compile warning with a cast.
1 year ago
Christopher Lam
5661c45d2a
gnc_commodity_table_get_namespaces must be g_list_freed
1 year ago
David Seifert
c06bc18dc4
Add missing `#include <cstdint>`
...
* GCC 15 has reduced transitive dependencies between headers.
Bug: https://bugs.gentoo.org/939856
2 years ago
John Ralls
274c033bab
Merge Przemysław Kryger's 'update-for-fq-1.63' insto stable.
2 years ago
Przemysław Kryger
cba868231b
Mark quote source strings for translations
2 years ago
Christopher Lam
c02152b34a
[Account.hpp] xaccAccountGetSplits returns a reference to vector
2 years ago
Przemysław Kryger
3dd9a70164
Use English names for Italian and Bucharest stock exchanges
2 years ago
Przemysław Kryger
9e4cd9e499
Remove US from alphavantage
2 years ago
Przemysław Kryger
a4b7c9b72c
Athens is Greece
2 years ago
Przemysław Kryger
1911bf5ff7
Use UTF8 ellipsys character in mutliple qoute sources lists
2 years ago
Przemysław Kryger
b7b7df5c06
Add regions to S-Investor and OnVista quote sources
2 years ago
Przemysław Kryger
84e6a21d29
Add morningstarau to single and aufunds to multiple _quotes_sources
2 years ago
Przemysław Kryger
700f8ca125
Remove ellipses from multiple_quote_sources where lists are complete
2 years ago
Przemysław Kryger
2e734b3239
Add back cse - Colobmo Stock Exchange to single_quote_sources
2 years ago
Christopher Lam
10857219ab
[Account.cpp] refactor acc->balance_limit getters/setters
2 years ago
Christopher Lam
63deaad249
[Account.cpp] use newer qof_instance_get|set_path_kvp
...
which do not require GValue dance
small modification of xaccAccountSetLastNum behaviour with
empty-string last_num
2 years ago
Christopher Lam
c0b2b761e9
[qofinstance.cpp] GValue on stack instead of heap
2 years ago
Christopher Lam
a26a6c4a6f
[qofinstance.cpp] add overloaded qof_instance_set|get_path_kvp
...
these overloaded functions to kvp slots do not require GValue
2 years ago
Przemysław Kryger
5fc768711b
Update gnc-commodity.cpp for finance-quote 1.63
2 years ago
Christopher Lam
ecabcef084
[Account.cpp] small modification xaccAccountSetLastNum
...
if last-num is empty-string, remove the slot. this makes the behaviour
consistent with other slots.
2 years ago
Christopher Lam
d13f930a8c
[Account.cpp] tightening loops, less g_list_free
2 years ago
John Ralls
7b34971c87
Gnc-options-date: Make the accounting period struct tm empty...
...
If the accounting period start-choice is anything but absolute instead
of matching the accounting period month and day to the present month and
day. The latter is a non-obvious hack that depends on
gnc_accounting_period_fiscal_start() returning the present day if it's
not set.
2 years ago
John Ralls
c584337c3a
Bug 799395 - relative date offset quarters occasionally wrong
...
If the accounting period start month and the present month are the
same the present month would be offset by 3. Don't do that.
2 years ago
John Ralls
a23506c88a
Add YH Finance (FINANCEAPI) API Key to Quotes infrastructure.
...
And add financeapi to known sources.
2 years ago
Christopher Lam
ab641b31f8
[gnc-datetime] improve CSV date parser with ICU and boost
...
1. Add dateformat "Locale" with ICU; uses current locale for date
parsing. ICU's locale date parser may parse "3 May 2023" or
"2024年9月13日" (LC_TIME=zh_TW.utf8) and maybe others.
2. Augment d-m-y m-d-y and y-m-d with boost UK/US/ISO parsers. This allows
CSV import of dates with months as words as "30 Sep 2023" or
"May 4, 1978" or "2023-Dec-25". Note boost parser cannot recognise
2-digit years, therefore "30 Sep 24" is invalid.
2 years ago
Christopher Lam
d935edeea5
[gnc-date.cpp] deprecate gnc_difftime
...
because it casts time64 to doubles
2 years ago
Christopher Lam
dc84e4d10c
[gnc-pricedb.h] remove unused gnc_pricedb_substitute_commodity
2 years ago
Christopher Lam
1718fa0b6e
[gnc-pricedb.h] remove unused gnc_pricedb_lookup_at_time64
2 years ago
Christopher Lam
a99491d034
[gnc-commodity.h] callers must free g_list
...
callers to gnc_commodity_namespace_get_commodity_list and
gnc_commodity_table_get_namespaces_list must free the GList.
2 years ago
John Ralls
514793d7a0
Bug 799389 - Crash when removing an account
...
Destroying the split vector from front->back crashes halfway through
because the iterators aren't updated as we remove items from the
vector. Iterating in reverse works because the remaining elements
aren't moved as we delete.
2 years ago
Christopher Lam
48f3842eaa
[Account.cpp] compare vectors with std::equal in xaccAccountEqual
2 years ago
Christopher Lam
f65f877098
[Scrub.cpp] don't create intermediate GHashTable and GList
...
use unordered_set instead
2 years ago
John Ralls
5fe7a09e7d
Bug 799370 - Transaction Journal view cursor placement after commit to...
...
transaction change.
This also reverts commit 60ccca017 and fixes Bug 799347 in a different
way that avoids the problems found during the investigation of 799370
and reported on gnucash-user.
2 years ago
Christopher Lam
88d8f63853
[Account.cpp] overload gnc_account_foreach_descendant takes std::function
...
and separate account_foreach_descendant_sorted
2 years ago
Christopher Lam
5f17334395
[transaction.cpp] use std::swap instead of SWAP macro
2 years ago
John Ralls
60ccca017f
Bug 799347 - Edit account to make it sub account under other account
...
Send QOF_EVENT_REMOVE on the child before actually removing it from
the children vector so that the stored indexes are valid long enough
to clear them.
2 years ago
John Ralls
ad7a51a6ef
Merge Chris Lam's 'acc-children-vector' into stable.
2 years ago
Robert Fewell
8bd7deb3dc
Reapply filter when number of sub-accounts change
...
When viewing a register that displays sub-accounts, if the number of
sub-accounts is changed, the query is rebuilt from the remaining
sub-accounts but when a filter is being used it is not applied after.
Fixed by checking the original query for a filter and if so applying
that after query rebuilt.
2 years ago
Christopher Lam
a6463f9814
[utest-Account] add more balance limit tests
2 years ago
Christopher Lam
b7fde90411
[Account.cpp] xaccAccountStagedTransactionTraversal copies SplitsVec
...
because create_transactions_for_instance which calls
xaccAccountStagedTransactionTraversal will modify the splits
2 years ago
Christopher Lam
cd097d19ec
[Account.cpp] don't copy SplitsVec
2 years ago
Christopher Lam
119e257146
[Transaction|Split.cpp] Remove Reg2 unused functions
2 years ago
Christopher Lam
47791734bb
[SX-ttinfo.cpp] tidier, using c++ stl and algo
2 years ago
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
2 years ago
Christopher Lam
d1807b6c15
[engine.i] move gnc_accounts_and_all_descendants to engine.i
2 years ago
Christopher Lam
6cac9d0ebb
[Account.cpp] priv->children is a vector<Account*>
2 years ago
Daniel Harding
c4d44ea024
Bug 799324 - Invalid free in gvalue_from_kvp_value()
...
As of ddc3f28899 , gvalue_from_kvp_value()
takes a GValue pointer from the caller, which in some cases points to
memory on the stack. If that is the case and the code also hits the
default case in the switch statement, the unconditional g_slice_free()
call will attempt to free stack memory, causing the program to abort.
Fix by requiring the caller to always pass in a valid GValue pointer,
making the caller responsible for freeing it if necessary. This also
means that it is no longer necessary for gvalue_from_kvp_value() to
return a value, so make it a void function.
2 years ago
Christopher Lam
6c7abb487d
[SX-ttinfo.hpp] convert to c++ header
2 years ago
Christopher Lam
7dc2e2e6f9
[SchedXaction.cpp] use c++ algo
2 years ago
Christopher Lam
55592efe25
[SchedXAction.cpp] convert to c++
2 years ago
Christopher Lam
109497d471
[SX-ttinfo.cpp] convert to c++
2 years ago
Christopher Lam
5b1bb1186f
[SX-book.cpp] convert to c++
2 years ago
Christopher Lam
e80249ce2b
[Account.cpp] gnc_account_remove_split shortcuts removing last split
...
this speeds up book shutdown which empties the account splits in
reverse chrono order.
2 years ago
Geert Janssens
c816d2b34f
Doxygen - minor cleanup of gnc-lot.h
2 years ago
Geert Janssens
e8d72ad53f
Doxygen - merge separate txt files into respective header files
2 years ago
Geert Janssens
6cd8e4e458
Doxygen - drop obvious cases of deprecated code
2 years ago
Geert Janssens
da12a212c3
Drop old migration script to split qof from engine
2 years ago
Geert Janssens
39aa5f9c09
Remove texi design document in engine
...
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.
2 years ago
Geert Janssens
58b4ee35f0
Doxygen - drop several txt files that were included in
...
docygen_mainpage.c
None of them had useful information describing actual
implementation concepts or details.
2 years ago
Geert Janssens
3c860737f1
Doxygen - fold business.txt file in the respective source files
...
The file mostly had short descriptions that were very similar
to the descriptions of business objects it referred to. The
exception was an explanation of how the billing terms and
tax tables handled their immutable copies. That bit has been
moved to its own group under the Business group and is referenced
from the BillTerm and TaxTables group.
This commit also fixes rendering of the Address doxygen info
and expands the BillTerm info to explain how proximo due dates
work.
2 years ago
Christopher Lam
038405b370
Revert "[account.cpp] gnc_account_remove_split searches from the end"
...
This reverts commit 5aff4fb57d . Was not
tested properly...
2 years ago
Christopher Lam
5aff4fb57d
[account.cpp] gnc_account_remove_split searches from the end
...
because removing the latest split is far more common (e.g. from ui or
during book shutdown) than removing an early split.
2 years ago
Christopher Lam
370a06fb61
[qofid.cpp] remove unnecessary struct
2 years ago
Christopher Lam
fe2cdf42c7
[transaction.cpp] speed up book close
2 years ago
Christopher Lam
d21d6f9344
[qofid.cpp] qof_collection_foreach_sorted
2 years ago
Christopher Lam
7b46466ebd
[account.cpp] fix regression caused by 3f7a5a8267
...
whereby deleting an account and moving all splits to another account
would segfault. make a copy of priv->splits and work on the copy
rather than the original.
2 years ago
Christopher Lam
e54e9d8086
[account.cpp] use HashTable for splits
...
reduces xml loading time from 3.5s to 3.1s, i.e. 11% improvement
2 years ago
Christopher Lam
b28ca9bdb4
use c++ placement new
...
to initialize non-c++ object members
2 years ago
John Ralls
579da58a10
Merge Gwynn Ciesla's "Allow building with GCC 14.1" into stable.
2 years ago
Christopher Lam
2817ca195f
[test-commodities.cpp] test stability of c_str names
2 years ago
Christopher Lam
f67233b662
Bug 799305 - Crash when there is more than one unknown quote source for commodities
...
instead of vector which requires reallocation, use a c++ linked list.
2 years ago
Christopher Lam
d867a9d18a
Merge branch 'TransactionP-hpp' into stable #1928
2 years ago
Christopher Lam
9e4b03f71b
[SplitP.hpp] rename to .hpp
2 years ago
Christopher Lam
1e1d21b716
[Transaction.hpp] rename to .hpp
2 years ago
Christopher Lam
ef8afedd09
[gnc-euro.cpp] use c++isms
2 years ago
Christopher Lam
3bc7ce606d
[gnc-euro.cpp] convert to c++
2 years ago
Christopher Lam
80997ee5b4
[gtest-gnc-euro] add rounding test
2 years ago
Christopher Lam
949c9c97c0
Bug 799300 - Nullpointer exception in gnc_quote_source_s
...
avoids constructing std::string with nullptr
2 years ago
Christopher Lam
87dbbf25f8
[account.cpp] add gnc_account_foreach_until_date
...
- uses binary search to find first split after date
- for_each from earliest split to (but excluding) the above first split
2 years ago
John Ralls
9c18bc889c
Don't use Googletest internal API for unused decls.
2 years ago
Bruce P Schuck
d01aad68fb
Update gnc-commodity.cpp
...
Fool.pm not working. Removed references to it from sources JSON structures.
2 years ago
Bruce Schuck
6696bf0a41
Updated QuoteSourceVec to match F::Q v1.59
2 years ago
Christopher Lam
0f791c474a
[Account.cpp][api] gnc_account_foreach_split takes std::function<void(Split*)>
2 years ago
Christopher Lam
871f669a19
[Account.cpp] explicitly destroy priv->splits
...
better than 35b6fb767d
2 years ago
Christopher Lam
35b6fb767d
[Account.cpp] ensure priv->splits releases memory on shutdown
2 years ago
Christopher Lam
94368f4cb4
[Account.cpp] SplitsVec&, ensure xaccAccountGetSplitList is freed
2 years ago
Christopher Lam
2b71219766
[Account.cpp] remove obsolete comment
2 years ago
Christopher Lam
1b50c6261a
g_list_free xaccAccountGetSplitList
2 years ago
Christopher Lam
606da28d25
use xaccAccountGetSplitsSize
2 years ago
Christopher Lam
f70ee754fc
use xaccAccountGetSplits and gnc_account_find_split
2 years ago
Christopher Lam
3f7a5a8267
[Account.hpp][API] xaccAccountGetSplits and gnc_account_find_split
2 years ago
Christopher Lam
a54caaab61
[Account.cpp] GetBalanceAsOfDate gets std::function instead of bool
2 years ago
Christopher Lam
cc10b9a0b7
[SX-book.c] tidy for loop
...
because splits will need to be g_list_free in a future commit
2 years ago
Christopher Lam
c1ee59c39b
[Account.h] size_t xaccAccountGetSplitsSize returns g_list_length (splits)
...
which is easily replaced with vector.size()
2 years ago
Christopher Lam
f08e0f5b61
[policy.cpp] rewrite to avoid goto
2 years ago
Christopher Lam
2251bf8966
[Account.hpp] use std::optional for cached values
...
whereby {} denotes uncached values
2 years ago
Sherlock
f0d45de642
Resolve test assert.
2 years ago
Sherlock
8d6f748aca
Bug 799281 - Deleting a transaction may trigger a crash
...
Update qof_collection_lookup_entity() to prevent returning instances marked to be destroyed.
2 years ago
Christopher Lam
d100df7ef7
[AccountP.hpp] .h -> .hpp, remove extern "C" {} wrapper
2 years ago