Commit Graph

164 Commits

Author SHA1 Message Date
Bill Nottingham
434dd9520c Adjust catch syntax to avoid GCC8 warnings. 2018-04-03 22:02:44 -04:00
Geert Janssens
4053f2ca53 Fix read and write of business counters and counter_formats
These are book options, but not stored under the default options frame (sigh)
So add exception code to properly access them.
2018-03-31 18:27:43 +02:00
Geert Janssens
d6a5cc9feb Merge branch 'imap-editor-fix' of https://github.com/Bob-IT/gnucash into unstable 2018-03-31 17:09:45 +02:00
Christopher Lam
f910d931f7 gncInvoice: complete removal gncInvoiceDateExists 2018-03-31 05:35:49 +08:00
Christopher Lam
b99dee1736 Replace gncInvoiceDateExists to gncInvoiceIsPosted
This commit partially reverts commit 862956a760 which exported
gncInvoiceDateExists. Remove this API and use gncInvoiceIsPosted
instead.
2018-03-31 05:35:49 +08:00
John Ralls
a23f103ebb Bug 794730 - SIGSEGV when entering an exchange rate, Part 2
91f4b19 changed the test for gncInvoiceDateExists from date != 0
to date != INT64_MAX, which isn't backwards compatible, so test
for both. But the submitted file had a posted date of -1 so
gncInvoiceIsPosted returned true anyway. That's not consistent with
the logic in dialog-invoice.c, which checked gncInvoicePostedAcc != NULL,
a better test. The result was that the "Post" button lit up but
gncInvoicePost returned immediately, doing nothing, so change
gncInvoiceIsPosted to use gncInvoicePostedAcc instead.
2018-03-30 11:19:51 -07:00
Robert Fewell
255d7194d8 Fix the gtests for the changes made to ImapInfo structure 2018-03-29 17:57:24 +01:00
Robert Fewell
6c43c3afe0 Fix Imap Editor to reflect the changes in kvp paths
There were several problems that broke the Imap Editor that have been
fixed due to kvp changes. The import-map-bayes entries were being added
to the tree view based on the number token entries squared. Retrieving
import-map entries resulted in an empty list and also deleting entries
from the tree view failed.
2018-03-29 17:32:57 +01:00
fell
9b8901248c Merge branch 'maint' into unstable 2018-03-15 18:12:03 +01:00
fell
fdfa6f528c Merge branch 'maint' into unstable 2018-03-10 11:06:59 +01:00
John Ralls
867fdce4e4 Gcc-4.8 doesn't have std::codecvt.
Use boost::locale::conv::utf_to_utf instead.
2018-03-09 16:28:00 -08:00
John Ralls
c3180ab374 Operator << fix. 2018-03-09 13:07:29 -08:00
John Ralls
5520fae838 Bug 793941 - 2.7.4: test failure on i686: 59 - test-gnc-timezone
Don't test before 1916, that's not a common GnuCash use-case.
2018-03-06 09:56:13 -08:00
John Ralls
36d729652b Speed up GUID equality comparison. 2018-03-06 09:48:38 -08:00
Geert Janssens
e2d69b174e Merge branch 'master' of https://github.com/nielsegberts/gnucash into unstable 2018-03-05 16:54:24 +01:00
Christopher Lam
4f98391a27 test-TR: unit tests
initial attempt
2018-03-01 20:55:17 +08:00
Niels
7ef8e6d489 Fix fall through in Account.cpp
Found with -Wimplicit-fallthrough, but older versions of GCC don't support it. So it will take some effort to add it to the build config.

I think it did not result in a reproducible bug.
2018-02-28 22:23:15 +00:00
John Ralls
765c117aac Optimize GncDateTime string constructor.
Turns out the stream facet parser is really slow. Since we have a
well-constrained universe of input formats we don't really need that
overhead. This got a 33% improvement in loading a large SQLite database.
2018-02-24 11:12:13 -08:00
Andreas Müller
128fce3ed8 Bug 787095 - Gnucash Crashes when opening old XML file 2018-02-22 15:59:12 -08:00
fell
464281644c Merge branch 'maint' into unstable
Should resolve issue mentioned in PR #277
Conflicts:
	libgnucash/app-utils/gnc-sx-instance-model.c: resolved
	po/de.po: changes in maint ignored
2018-02-19 15:25:53 +01:00
John Ralls
f4965ae2ac Move direct check dependencies to the originating CMakeLists.txt.
Removing transitive dependencies from being declared direct.
2018-02-18 22:16:27 -08:00
John Ralls
a5f46a5e45 More Scheme dependency additions. 2018-02-18 15:59:00 -08:00
John Ralls
48bdab38d4 Replace sprintf with Guile's built-in format. 2018-02-17 15:24:44 -08:00
John Ralls
26e51339a6 Rework the Scheme target dependencies.
Should fix Bug 793122 - 2.7.3: ninja build fails
along with the nagging parallel-build problems.
2018-02-16 14:28:46 -08:00
John Ralls
6b49b3ba4c Bug 792763 - deleting a transaction can cause a SIGSEGV
Prevent a NULL transaction from crashing xaccTransCountSplits and
prevent gnc_plugin_business_update_menus from calling it with a
NULL transaction.
2018-02-02 13:05:20 -08:00
Christopher Lam
862956a760 BUGFIX: invoice posted-date is no longer 0 for unposted invoices
This commit fixes business reports caused by 91f4b19039
whereby the posted-date for unposted invoice was changed
from 0 to MAXINT. Now we need to use (gncInvoiceIsPosted)
or (gncInvoiceDateExists) instead.
2018-01-30 19:29:04 +08:00
Geert Janssens
49a936c1fd Rewrite gnc_add_swig_guile_command to work in dist tarball as well
When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
2018-01-29 19:46:44 +01:00
Geert Janssens
ec213360f3 Review which built files are really needed in the dist tarball
Several were only there because they used to be generated via autogen.sh
and hence had to be included because autogen.sh was not supposed to be run
in a tarball based build.
A few others aren't clear so I have left them in for now:
- gnucash.1 (man page)
- gnucash-design.info (because it's unclear what we want to do with that one)

These files should clearly be in the tarball:
- gnucash.pot -> for our translators
- ChangeLog -> can't be generated outside of a git repo
- gnc-vcs-info.h -> can't be generated outside of a git repo
- guile/python bindings -> to avoid a swig dependency when building from tarball
2018-01-29 19:46:44 +01:00
Geert Janssens
4317d8a8f6 Improve handling of generated distributable files
- the two dist_add_... macros now both take a list of file names
as argument so more files can be added at once to the dist tarball.
- dist_add_generated now creates the right target by itself. There's
  no need to pass one any more
- make the swig generated *.py module files explicit output files
- change a couple of custom_targets into custom_commands. The only
  reason they were defined as targets was to ensure they got built
  before the dist tarball. This is now properly handled by the
  dist_add_... macros.
- correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS
  was not the way to do it according to that property's help page)
2018-01-29 19:46:44 +01:00
Geert Janssens
3dff4e5211 Fix make dist on a clean checkout
cmake with unix makefiles fails to resolve dist dependencies
added from COPY_FROM_BUILD if these dependencies aren't built yet.

This commit replaces the COPY_FROM_BUILD based logic with two new functions
'dist_add_configured' and 'dist_add_generated' to indicate which files should
be included in the dist tarball. The latter also adds a target level dependency
to the dist tarball custom command. Hence the former should
be used for files that get generated during a cmake run while the latter
should be used for files generated as the result of a 'make/ninja-build' run
(like files for which an add_custom_command rule exists).

Note: this commit also temporarily disables the dist target when building
from a tarball (and hence it won't be tested in distcheck either). This
will be handled in a future commit.
2018-01-29 19:46:44 +01:00
Geert Janssens
18feaa16a7 Remove support code to load qof backend in autotools based build environment 2018-01-26 18:26:06 +01:00
Geert Janssens
52b0c06d30 Merge branch 'maint' into unstable
Conflicts:
- gnucash/gnome-utils/gnc-main-window.c
  I have chosen to ignore the changes pulled in from maint. The same change will
  be reimplemented in a followup commit.
- po/ru.po
  Same here. The translation conflicted too much and there's a
  translation update available for unstable I will pull in soon.
2018-01-25 10:24:53 +01:00
Christopher Lam
ca22d5531b Change gnc_pricedb_convert_balance_nearest_price from timespec to time64. 2018-01-20 16:40:45 -08:00
John Ralls
74ddb671e4 Merge Chris Lam's and Aaron Laws's branch 'time64-ftw' into unstable. 2018-01-20 12:40:32 -08:00
John Ralls
91f4b19039 Convert python bindings from timespec to time64. 2018-01-20 12:35:04 -08:00
John Ralls
6ffb77de20 Merge branch Rob Gowin's 'bye_bye_autotools' into unstable. 2018-01-18 12:02:56 -08:00
Geert Janssens
2364c5607f Merge branch 'maint' into unstable
Resolved conflicts:
	gnucash/gnome-search/dialog-search.c
	gnucash/gnome-utils/gnc-splash.c
	gnucash/import-export/aqb/gnc-plugin-aqbanking.c
	gnucash/import-export/import-account-matcher.c
	po/de.po
	src/report/standard-reports/budget-barchart.scm
	src/report/standard-reports/budget.scm

Note the de.po conflict was resolved by dropping all changes
and merging the file again with gnucash.pot (generated after
the merge but before committing).
2018-01-17 18:08:05 +01:00
John Ralls
26fa2acfd5 Use a more appropriate comparison for doubles. 2018-01-16 17:24:29 -08:00
John Ralls
8f96882ead Remove tests checking members of deleted objects.
GLib's scribbling of freed memory is enabled on Arch so attempting to
read the deleted members of inst and book crash instead of reaturning
invalid results. These weren't really useful tests anyway.
2018-01-16 17:24:29 -08:00
John Ralls
8900b19da3 Bug 790845 - 2.7.3: massive test failures on some architectures (reopened).
Fix some test failures caused by erroneous size assumptions.
2018-01-14 16:31:22 -08:00
Rob Gowin
54ac7f23e0 Remove Autotools 2018-01-13 12:52:57 -06:00
John Ralls
ebbcd30f39 Save Changes Bug 792106 - Wrong dates displayed
The first attempt to fix this, a17bc85a, doesn't work because the
boost::date_time constructor gets enough information in most cases to
generate a date, just not the one we expect. This change looks for '-' in
the fourth position and if it's there assumes iso-extended format, otherwise
it assumes delimiter-less ISO without the 'T', i.e. %Y%m%d%H%M%S.
2018-01-09 14:58:43 -08:00
John Ralls
fcf88262ca Extract function tz_from_string.
Also changes from calculating the Bug 767824 offset to using
boost::date_time::local_time_in() and provides unit tests.
2018-01-09 14:08:42 -08:00
Christopher Lam
465c9e1f21 ADD-TIME64-API: libgnucash/engine/gnc-pricedb.[ch]
gnc_pricedb_lookup_nearest_in_time64
gnc_pricedb_lookup_nearest_in_time_any_currency_t64
2018-01-08 22:56:49 +11:00
Christopher Lam
dda0695285 ADD-TIME64-API: libgnucash/engine/gnc-pricedb.[ch] 2018-01-08 22:56:49 +11:00
Christopher Lam
46c9fcc8f8 TP->T64: libgnucash/engine/test/test-split.scm 2018-01-08 22:56:49 +11:00
Christopher Lam
fefea400ce TP->T64: libgnucash/engine/engine-interface.scm 2018-01-08 22:56:49 +11:00
Christopher Lam
b53aa85660 TP->T64: libgnucash/engine/test/test-extras.scm 2018-01-08 13:01:29 +11:00
lmat
e6ee060121 Adding bill term time64 function 2018-01-08 13:01:29 +11:00
lmat
6dc982c2c6 Some time64 corrections
The build system isn't always catching changed files, so these showed up
later.
2018-01-08 13:01:29 +11:00