John Ralls
d2fa23dd5f
Bug 752204 - .gml2 files are modified during build
...
Turn off compression so that they aren't, except when scrub changes them
to a new format. In those cases the changes should be committed.
2015-07-10 12:47:43 -07:00
John Ralls
b741c8e1de
Initialize GError to NULL or it doesn't work.
2015-07-10 12:47:43 -07:00
John Ralls
b9d6b8423f
Guard against multiple typedefs of KvpFrame and KvpValue.
...
It's legal for C11, but not before. No need to gratuitously force an
upgrade.
2015-07-09 09:15:15 -07:00
John Ralls
7d940a5d91
Bug 749077 - wrongfully invalidating any account save location/path starting with ".gnucash"
2015-07-07 17:05:51 -07:00
John Ralls
d3e70217cd
Move libgtest.a arg from Makefile to configure, add -pthread flag.
2015-07-07 16:46:13 -07:00
John Ralls
df05702ffb
Fix extra comment close.
2015-07-07 16:40:02 -07:00
John Ralls
42b3bfbbfe
Restore Date::Manip to quotes modules.
...
Gnc-fq-helper needs it to parse date and time strings from Finance::Quote.
The comment about using the iso-date field is removed because F::Q no
longer provides it.
2015-07-07 13:02:18 -07:00
John Ralls
6447be9ba9
Document that KvpFrame and KvpValue take ownership of pointers passed to them.
2015-07-07 12:04:06 -07:00
John Ralls
ca62782d93
Fix up double-frees or frees of unallocated objects in KVP.
...
Revealed by ensuring that KvpFrame and KvpValue deep-destroy their contents.
2015-07-07 12:03:37 -07:00
John Ralls
919fe76c95
Clear the option slots the right way.
...
Deleting the frame leaves the value with an invalid pointer.
2015-07-06 13:55:13 -07:00
John Ralls
5921c63a01
Update the copyright date for Help|About to 2015.
...
Only 6 months late!
2015-07-05 16:33:52 -07:00
John Ralls
133f03d45a
Fix crash on attempting to load features from KVP if there aren't any.
2015-07-05 16:14:33 -07:00
John Ralls
50787fc333
Fix broken python test, adding new C unit test to cover the break.
2015-07-05 15:55:49 -07:00
John Ralls
bdf5cb9bee
Update CMakeLists.txt for some cpp files that got missed when they were changed or added.
2015-07-05 14:13:02 -07:00
John Ralls
56c3316379
Merge branch 'kvp-cleanup'
...
Remove the KVP C API and consolidate use in a few files in libqof. For
almost all future use KVP should be accessed via
qof_instance_set/get_kvp() or qof_book_get/set_option(). These
interfaces will ensure that changes to KVP are immediately committed
unless they're called from inside a begin_edit/commit block to
consolidate a database transaction.
Some exceptional corner cases where direct access to KvpFrames are
abstracted into new objects in libqof. The KVP "bag" interface of
kvp-utils is removed and its single in Split.c made more direct with
qof_instance_kvp_foo_guid functions.
Account, Transaction, and Split use qof_instance_copy_kvp and
qof_instance_swap_kvp as part of their rollback facilities.
Resolves bugs 87652, 120250, 736139, and 736687.
2015-07-04 17:00:53 -07:00
John Ralls
cc515150d9
Bug 120250 - KVP XML loader ignores '0' timestamps?
2015-07-04 17:00:32 -07:00
John Ralls
20a5202899
Bug 87652 - KVP modification does not change 'dirty' flag.
2015-07-04 17:00:32 -07:00
John Ralls
4623cff38d
Document new KVP API in Doxygen, including relevant bits from src/docs/design.
2015-07-04 14:09:14 -07:00
John Ralls
e81b816658
Update doxygen config to use C++ files and drop obsolete commands.
...
Also turn on autobrief, STL support, and reduce the tab size to 4.
2015-07-03 17:15:24 -07:00
John Ralls
d3e62f41be
Remove the KVP C API.
...
All access to KVP is now implemented in C++11.
2015-07-03 17:15:24 -07:00
John Ralls
ff07762f61
Move the KVP_TYPE enum to kvp-value.hpp.
...
This had some extraordinary knock-on effects because C++11 treats enums
very differently from C, so any C code that directly accessed the enum
had to be converted to C++.
That included test-engine-stuff, and because it quite sensibly builds as
a ranlib archive instead of a shared library everything that uses it must
at least link as C++. Fortunately automake takes care of doing this when
the default extension for check_PROGRAMS is cpp, even if the source file
is C.
2015-07-03 17:15:21 -07:00
John Ralls
3590de1085
Convert tests to C++ and the KVP C++ API.
2015-07-03 17:14:32 -07:00
John Ralls
fd935d3b82
Convert libqof kvp calls to C++.
2015-07-03 17:13:14 -07:00
John Ralls
9e142124f4
Convert kvp-scm to C++ and to using the KVP C++ API.
...
The binding remains C to simplify interaction of these two functions with
SWIG and Scheme.
2015-07-03 17:13:14 -07:00
John Ralls
78b5b7cb5b
Convert gnc-slots-sql.cpp to use the Kvp C++ API.
...
Plus a few minor C++11 tweaks.
2015-07-03 17:13:14 -07:00
John Ralls
7c4e1f7f2a
Fix slash handling in keys.
...
In actual use '/' is a path delimiter indicating a child KvpFrame. The
previous implementation created keys for single frames with embedded '/'
characters.
Memory management issues in make_vector necessitated changing Path to a
std::vector<std::string>>.
2015-07-03 17:13:13 -07:00
John Ralls
0987184709
Add path-vector get/set functions to KvpFrameImpl.
...
Needed for Scheme access. The C functions used GList.
2015-07-03 17:13:13 -07:00
John Ralls
45a01b0f67
Change the KVP string storage type from char* to const char*.
...
Because we don't want to be able to get a pointer to the KvpValue and
change its contents without using KvpValue::set().
2015-07-03 17:13:13 -07:00
John Ralls
831a360122
XML Backend:Replace C KVP function calls with C++.
2015-07-03 17:13:13 -07:00
John Ralls
ab30b4c680
Remove #include "kvp_frame.h" from qof.h and add it where it's legitimately used.
2015-07-03 17:13:13 -07:00
John Ralls
c721bf9f48
Remove the unused backend-configuration member and virtual setter/getters.
...
Not used, and if it was it would be an inappropriate use of KVP.
2015-07-03 17:13:13 -07:00
John Ralls
3956ee0f01
Remove the rest of the KVP direct-query functions.
2015-07-03 17:13:13 -07:00
John Ralls
171669ec68
Change io-gncxml-v2.c to C++.
2015-07-03 17:13:13 -07:00
John Ralls
435aef03b7
Isolate direct KVP operations.
...
Into sixtp-dom-parser, sixtp-dom-generator, and gnc-slots-sql.
The XML V1 file io-gncxml-v1.c is not yet done.
2015-07-03 17:13:13 -07:00
John Ralls
13377f56d5
Cpp files in CMakelists.txt.
2015-07-03 17:13:13 -07:00
John Ralls
55e4d30a44
Pass QofInstance instead of KvpFrame to gnc_sql_slots_save.
2015-07-03 17:13:13 -07:00
John Ralls
8b53483562
Change gnc-slots-sql, sixtp-dom-generators, and sixtp-dom-parsers to C++.
...
So that they'll be able to use the C++ Kvp classes.
2015-07-03 17:13:12 -07:00
John Ralls
9b3f6078fc
Abstract options handling to QofBook.
...
Eliminates direct KVP access in app-utils, all of which centered around
options.
Beneficial side effect: With all option writes now handled by
qof_book_set_option(), the problem of options not being committed is
eliminated.
The options system is unnecessarily complex, with much back-and-forth
between C and Guile. It needs to be completely rewritten, but that's a
project for its own branch.
2015-07-03 17:13:12 -07:00
John Ralls
fa22188549
Remove gnc:kvp-option-dialog, make gnc_make_kvp_options static.
...
gnc:kvp-option-dialog is unused, was only external user of gnc_make_kvp_options.
2015-07-03 17:13:12 -07:00
John Ralls
cb9d8c93b7
Use gnc:company-info instead of directly accessing the KVP in reports.
2015-07-03 17:13:12 -07:00
John Ralls
095d1781f0
Remove a couple of distracting comments about KVP.
2015-07-03 17:13:12 -07:00
John Ralls
61ecdda845
Miscellaneous KVP cleanup.
...
Everything but the backends and app-utils.
2015-07-03 17:13:12 -07:00
John Ralls
a4c748e201
Miscellaneous KVP cleanup in Engine.
...
Doesn't include tests or Scheme support.
2015-07-03 17:13:12 -07:00
John Ralls
f631f6e6c5
Fix formatting, line too long.
2015-07-03 17:13:12 -07:00
John Ralls
68dedc1ba2
Reimplement gnc_template_register_get_debcred_entry.
...
So that it at least returns something reasonable. Note the comment, though.
2015-07-03 17:13:12 -07:00
John Ralls
43e93e5fb5
Modify gnc_imap... functions to use KVP indirectly, provide unit tests.
2015-07-03 17:13:12 -07:00
John Ralls
ccd74059a2
Implement qof_instance_for_each_slot().
...
Wraps kvp_frame_for_each_slot().
2015-07-03 17:13:12 -07:00
John Ralls
dcc9bfec36
Reimplement AQBanking template list in C++ and in libqof.
...
It requires direct manipulation of KVP, so it needs to be hidden away in
libqof.
2015-07-03 17:13:12 -07:00
John Ralls
b4e0240783
Make the instance const in qof_instance_get_kvp().
2015-07-03 17:13:12 -07:00
John Ralls
4f4711c564
Convert Scrub.c from using direct KVP to routing them through qof_instance.
2015-07-03 17:13:12 -07:00