Commit Graph

16273 Commits

Author SHA1 Message Date
John Ralls
163acb863d Two minor tweaks to pass make check. 2014-08-04 15:06:02 -07:00
John Ralls
1e5b14b54f Merge branch 'guidcpp' of https://github.com/limitedAtonement/gnucash
into guidcpp
2014-08-04 14:35:23 -07:00
John Ralls
28e1d1a8c2 Add gnc-date.cpp to POTFILES.in
Because make check complained. Dunno what changed...
2014-08-04 14:18:39 -07:00
John Ralls
c146e21043 Replace built-in md5 hashing with GChecksum
Prepare for removing it when we replace the GncGUID implementation with Boost.
2014-08-04 14:09:22 -07:00
Michalis Kamprianis
edad186789 Bug 120199 - Incorrect sort order in "Sort by Statement Date"
modified:   src/gnome/gtkbuilder/gnc-plugin-page-register.glade
2014-08-02 11:24:06 +02:00
lmat
9711ae2446 Added new tests.
Added tests for string_to_guid and guid_replace.
2014-08-01 10:23:30 -04:00
Geert Janssens
11698f4824 Revert "Bug #622778 Miscalculation in cashflow reports - Step 01"
This reverts commit 77340591a9.
See bug 622778 and bug 722140 for more details.
2014-08-01 11:59:12 +02:00
Geert Janssens
66dd0cc7c8 Revert "Bug #622778 Miscalculation in cashflow reports - Step 02"
This reverts commit 8a95c0f0b7.
See bug 622778 and bug 722140 for more details.
2014-08-01 11:58:51 +02:00
Geert Janssens
f086c18714 Revert "Bug #622778 Miscalculation in cashflow reports - Step 03"
This reverts commit 77ff603655.
See bug 622778 and bug 722140 for more details.
2014-08-01 11:38:03 +02:00
Geert Janssens
f0abc2c014 Revert "Round properly when computing fraction of the transaction's value due to a given split."
This reverts commit d339141394.
See bug 622778 and bug 722140 for more details.
2014-08-01 11:37:20 +02:00
Geert Janssens
f34c4e0f2f Revert "The cash flow report should ignore splits in trading accounts."
This reverts commit 15e9bde7c3.
See bug 622778 and 722140 for more details.
2014-08-01 11:35:47 +02:00
Erik Johansson
13ef7eec6e Update Swedish translation
Copied from the Translation Project
2014-08-01 10:36:29 +02:00
lmat
726ab02d65 Simplified some of the GUID code.
This change applies some recommendations from jralls. It better utilizes for loops,
and usage of swap. We also try to make sure the null guid is not freed since it's
reused, and catch a c++ exception to make sure it doens't escape into C code when
parsing a GUID.
2014-07-28 17:03:07 -04:00
lmat
ce94872ec8 Cleaned up some code and comments.
There should be no impacting changes in this commit.
2014-07-28 16:52:22 -04:00
lmat
cbc292cc91 Removed the md5 file and updated the build system.
We no longer need md5.h or md5.c because all that work is done in the boost
uuid implementation.
2014-07-28 11:15:28 -04:00
John Ralls
2f189c38e9 Fix a couple of minor issues noticed by Robert Frewell. 2014-07-27 17:11:34 +01:00
lmat
f40a93c6e1 Remove guid_init and guid_shutdown
They no longer do anything, and it's not probable that they ever will.
2014-07-25 17:38:33 -04:00
lmat
30fac05e35 Corrected uses of guid_to_string.
Previously, guid_to_string had been marked deprecated with a note about
it not being thread-safe. It was much worse than "not thread safe", it
was only safe in a particular situation, and its safety was being violated
throughout the code. It was clear that users of guid_to_string did not
understand what it was purporting to do because of its varied uses. Most
uses simply treated it like a Garbage-Collected Java String (use and forget).
I actually found at least one instance where the string was being freed. (!!!)

I made the method have a particular easy-to-understand semantic: it returns
a pointer to a string which must be freed by the caller. I then tried to
track down all uses of this function and correct them. Mostly, I just changed
the usage to guid_to_string_buff with a stack-allocated string to avoid the
the malloc/free cycle.
2014-07-25 17:30:55 -04:00
lmat
2a408ab9ef Cleared up GUID construction and allocation
To allocate a GUID, use guid_malloc. To allocate and construct a guid
(which is actually unique), use guid_new (and be sure to free it using
guid_free).
2014-07-25 14:14:09 -04:00
lmat
9c82a1e9bc Rename guid_new to guid_replace
`new` implies some allocation. Since guid_new was actually constructing
a guid in place rather than allocating it, it makes much more sense to
call it guid_replace (or guid_construct). We went with guid_replace.
2014-07-25 08:26:54 -04:00
lmat
26a49f9644 Implement GUID using boost's implementation
Since we're maintaining a C api, the implementation is sometimes less than
intuitive from either a C or C++ perspective. I am trying to use as much
boost as possible while making all the guarantees that the C code makes.

One function was declared deprecated because it "wasn't thread safe". This
was straightforward to repair, and is no longer marked deprecated, and there
are now two ways to convert GUID to String: passing your own character
buffer, and having one returned to you that you need to free.
2014-07-25 08:17:28 -04:00
John Ralls
2869e9412e Really make it 1.48 instead of 1.49. 2014-07-21 10:17:17 +01:00
John Ralls
a995196d3e Lower Boost minimum version to 1.48.0 per user request. 2014-07-21 10:08:03 +01:00
Mike Alexander
0c41f3bc5e Merge branch 'maint' 2014-07-13 22:50:30 -04:00
Mike Alexander
359327e942 Bug 733107: Search for reconcile status doesn't work right. 2014-07-13 22:50:12 -04:00
Mike Alexander
8b76ff21a2 Use symbols to access lot owner type and owner GUID properties. 2014-07-05 01:12:20 -04:00
Mike Alexander
bacc0b2a65 Fix crash in gncOwnerGetOwnerFromLot due to clobbered stack variable.
The "owner-type" lot property is 64 bits, don't store it in a 32 bit variable.
2014-07-05 01:12:12 -04:00
Geert Janssens
147a5f5d00 Disable non-literal-null-conversion warning issued by clang 2014-07-04 16:25:12 +02:00
Geert Janssens
4b3373c96b More '\0' -> NULL replacements to avoid clang warnings 2014-07-03 19:20:33 +02:00
John Ralls
1d3cee110c Revert unintended restoration of AC_MSG_RESULT. 2014-07-03 09:51:53 +02:00
John Ralls
29923b1fd9 Replace '\0' with NULL as char* argument, avoiding warning. 2014-07-02 22:55:36 +02:00
John Ralls
773326b7c5 Fix typo from 859866a. 2014-07-02 22:54:39 +02:00
Mike Alexander
d338982828 Properly nest AC_MSG_CHECKING and AC_MSG_RESULT calls to avoid confusing output. 2014-07-02 15:27:59 -04:00
John Ralls
859866ad28 Replace clang check with ax_check_compile_flags for -Wno-deprecated-register 2014-07-02 11:40:18 +02:00
Mike Alexander
97618e00c8 Use guint64 instead of uint64_t with G_GUINT64_FORMAT to avoid warnings. 2014-07-01 23:29:35 -04:00
Mike Alexander
84384ea565 Merge branch 'maint' 2014-07-01 22:51:30 -04:00
Mike Alexander
19737113ad Merge branch 'maint' into 'master' 2014-07-01 16:29:34 -04:00
Geert Janssens
2952df937c Drop packaging/win32
Windows build specifics are now handled in gnucash-on-windows repository
2014-07-01 22:16:37 +02:00
John Ralls
4aed8b37e1 Don't try to use -Wno-deprecated-register with Clang.
It doesn't work.
2014-06-29 15:20:20 +02:00
Geert Janssens
17ed25229f First unit test for gncEntry and fix first bug it revealed 2014-06-21 23:39:50 +02:00
Geert Janssens
031943c565 Fix whitespace 2014-06-21 23:19:36 +02:00
Geert Janssens
f2ffaf23ae Revert "Bug726674-BudgetReverseSignSupport"
This patch got pushed by accident before it was ready to be committed.
This reverts commit 247f086703.
2014-06-21 15:17:42 +02:00
Carsten Rinke
3b4111c16d Bug 726535 - Budget BarChart Report - add option to change to a line chart
Rebasing the patch for 2.6.3 to master commit ea2389f0932beae..
(done manually, not using git)
2014-06-19 11:46:30 +02:00
John Ralls
ea2389f093 Merge branch 'c++-build' 2014-06-16 11:04:18 -07:00
John Ralls
34a7e8d62c Add Boost requirement to CMake. 2014-06-16 11:03:45 -07:00
John Ralls
273648ea80 Allow C/C++ extensions
MinGW declares any standard functions not part of the ISO C standard
in #ifndef __STRICT_ANSI__ blocks; Gcc defines __STRICT_ANSI__ with
-std=c++11; Pass 'ext' to the C++11 macro to get -std=gnu++ll, which allows
all those extensions we use.
2014-06-15 14:42:49 -07:00
lmat
949702d04d Added a GUID test suite
The plan is to change gnc guid to use boost's guid implementation. There were
no tests for guid before, but we need them to ensure that we don't have regressions
when that work begins.
2014-06-15 14:42:47 -07:00
John Ralls
ce409753b8 Disable C++11 deprecation warning for register storage class
It's used in GLib, so we're stuck with it for the short term.
2014-06-15 14:42:46 -07:00
John Ralls
b36a98149b Better test for conflict between optimization and FORTIFY_SOURCE 2014-06-15 14:42:45 -07:00
John Ralls
33aa8a13a7 Don't override CFLAGS, CPPFLAGS, etc.
Doing so gives the hardcoded values precedence over the user's environment.
Use AM_CFLAGS, AM_CPPFLAGS, etc. instead.
2014-06-15 14:42:43 -07:00