Christoph Holtermann
7455412639
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
...
gnc_search_numeric_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
2018-12-06 19:17:19 +01:00
Christoph Holtermann
990e7a05f5
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
...
gnc_plugin_page_invoice_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
2018-12-06 18:53:41 +01:00
Christoph Holtermann
d523f0db7c
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
...
gnc_search_owner_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
2018-12-06 18:53:10 +01:00
Christoph Holtermann
0c945797dd
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
...
gnc_plugin_qif_import_get_type is being replaced by that provided by G_DEFINE_TYPE_WITH_PRIVATE
2018-12-06 18:51:43 +01:00
Christoph Holtermann
cd886f0c17
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
2018-12-06 18:51:25 +01:00
Christoph Holtermann
c674d33e41
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
...
and adapt name of private property to work with G_DEFINE_TYPE_WITH_PRIVATE
2018-12-06 18:50:58 +01:00
Christoph Holtermann
5e90b0e4a4
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
...
and adapt name of private property to work with G_DEFINE_TYPE_WITH_PRIVATE
2018-12-05 22:39:16 +01:00
Christoph Holtermann
1eb045070a
use G_DEFINE_TYPE_WITH_PRIVATE to replace g_type_class_add_private
...
and adapt name of private property to work with G_DEFINE_TYPE_WITH_PRIVATE
2018-12-05 22:17:37 +01:00
Christoph Holtermann
8c62231711
directly use G_DEFINE_TYPE instead of QOF_GOBJECT_GET_TYPE
2018-12-05 22:17:28 +01:00
Christoph Holtermann
b7d005b485
directly use G_DEFINE_TYPE_WITH_PRIVATE instead of QOF_GOBJECT_GET_TYPE
2018-12-05 21:17:52 +01:00
Christoph Holtermann
54c9ef33ba
replace deprecated g_type_class_add_private
2018-12-04 21:03:25 +01:00
John Ralls
519880545b
Fix missing screen for GLib < 3.22.
2018-11-30 17:10:10 +09:00
John Ralls
5dcb44d991
Fix regex in CMakeLists.txt.
...
Apparently CMake doesn't handle backslashes well and \.
doesn't work in spite of its being an example in the documentation.
2018-11-30 16:40:35 +09:00
John Ralls
e434835f68
Remove special Apple compile flags, no longer required.
2018-11-30 16:23:30 +09:00
John Ralls
3f09e5c6f1
Only disable register warnings for SWIG 2.
...
SWIG 3 has removed the register storage class markers.
2018-11-30 16:11:42 +09:00
John Ralls
e81bcf6e33
Fix the remaining static analysis warnings.
...
Except two incorrect leak warnings and one about mktemp
being insecure in the XML backend. See the respective
comments about those.
2018-11-30 15:08:41 +09:00
John Ralls
bf55c30aeb
Fix most of the unused assignment errors from static analysis.
...
There are a very few left that need deeper study, but this gets
rid of most of the noise. For the most part it's just getting rid of
extra variables or removing an assignment that is always
replaced later but before any reads of the variable. A few are
discarded result variables.
2018-11-30 15:08:41 +09:00
John Ralls
a93448414f
Fix another uninitialized variable in register.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
f52609961e
Fix uninitialized variables (and one leak) in gnome.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
185787d7be
Initialize some gnc_numerics that could be returned uninitialized.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
8ed9a9c43a
Initialize some variables that could be otherwise used uninitialized.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
7e10b05c49
Avoid over-ranging string storage.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
7283c86f6f
Fix various static analysis logic errors in gnome-utils.
2018-11-30 15:08:41 +09:00
John Ralls
876bfd19ad
Protect against nullptr dereference, remove unused GError.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
24ce92056d
Protect from potential nullptr dereferences.
...
pmtsched is created in only one banch of the opening switch.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
8f22c4bed4
Localize variables, ensure that val_imbalance is set, test txn_curr != commodity once.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
4ffeb3efac
Ensure that a dereferenced variable isn't NULL.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
43a30e1c97
Silence clang static analyzer complaint about potential div by 0.
...
It can't, because if b is 0 the function would have
returned already; since b.m_hi is 0 b.m_lo can't be. The assert
reassures clang that this is the case.
2018-11-30 15:08:41 +09:00
John Ralls
3d1362757b
Prevent potential undefined behavior by shifting by a wrapped uint.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
606d9cfee6
Prevent potential nullptr dereference.
...
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
faba7975ac
Fix a bunch of memory allocation errors found by clang static analysis.
2018-11-30 15:08:41 +09:00
Geert Janssens
de6c173ef4
Merge branch 'Bug796896' of https://github.com/Bob-IT/gnucash into maint
2018-11-28 14:21:16 +01:00
John Ralls
61cd7999f3
Fix half-up, half-down, and banker's rounding for negative numbers.
...
We need to compare the magnitudes of the remainder and the denominator
in order to round negative numbers correctly. Note that while gnc_numeric
is constrained to a positive denominator the C++ rounding functions cannot
assume that constraint in all cases.
Combined with the previous commit, this fixes
Bug 796949 - Incorrect conversion of 0,01 USD to EUR
2018-11-27 22:17:22 +09:00
John Ralls
536606a89c
Fix extract_common_prices logic.
...
So that the returned price tuple has the two commodities of interest
converted to a common currency. Before the first pair that that shared
any random currency would be returned, perhaps creating an absurd result.
2018-11-27 22:17:22 +09:00
Robert Fewell
458dac89fe
Bug 779565 - Treeview header combos do not work at first load
...
When the csv preview page is first loaded the header combo will not
work till refreshed which can be done by selecting another separator.
By adding a g_idle_add to the preview_page_prepare to rebuild the table
the combos become active.
2018-11-26 17:26:58 +00:00
Robert Fewell
79373d5b5e
Fix an alignment issue and remove redundant ctreeview
2018-11-26 17:26:58 +00:00
Robert Fewell
78c8e8f3af
Make similar changes to transaction import CSV assistant
2018-11-26 17:26:58 +00:00
Robert Fewell
8ed40078b0
Make similar changes to price import CSV assistant
2018-11-26 17:26:52 +00:00
Robert Fewell
2b9b3d4a5e
Fix a missing transient warning for error dialogue
2018-11-26 17:26:51 +00:00
Robert Fewell
5201fe5f34
Disable forward button if there are no entries in store
2018-11-26 17:26:51 +00:00
Robert Fewell
4abbd86d0d
Remove window reference and use assistant instead
2018-11-26 17:26:51 +00:00
Robert Fewell
92b587fa56
Make similar changes to account import CSV assistant
...
Remove the OK button from the file page.
2018-11-26 17:26:44 +00:00
Robert Fewell
1b2feacd4b
Bug 796896 - Button to complete an export not intuitively placed or discoverable
...
The assistant file page is made up of an embedded GtkFileChooser widget
and associated OK button which seems out of place. Remove the OK button
and use the selection-changed signal to control the 'Forward' button.
2018-11-26 17:26:37 +00:00
Geert Janssens
e57d4278e8
Bug 760825 - On duplicating a bill, the entry dates should be set to the bill date, not to the current date - followup
...
Use neutral time on entry post dates instead of canonical time
2018-11-20 21:13:39 +01:00
Geert Janssens
13f6c4d6d7
Introduce and use gnc_time64_get_day_neutral
...
This function complements gnc_time64_get_day_begin/end. There was
time64CanonicalDayTime but this returned noon of the given day, where we
want 10:59am in most cases. I haven't changed time64CanonicalDayTime
directly as that may break assumptions in other parts of the code.
Instead I have created a new function that can be gradually introduced.
2018-11-20 21:12:32 +01:00
Geert Janssens
11af81b51b
Bug 789674 - Close Book tool regression
2018-11-20 18:55:09 +01:00
Geert Janssens
370562970e
Fix travis failure due to changed option name
2018-11-18 17:28:30 +01:00
Geert Janssens
cd04e805e3
Bug 796919 - Leading '+' character not accepted in amount when value surrounded by quotes
...
Use a variant of xaccParseAmount that allows to ignore the locale's positive_sign character
or the + sign if locale doesn't define a positive_sign character.
In a future redesign it would probably be better to replace use
of xaccParseAmount with some variant of the gnc-expression-parser
but that would require more that a few tweaks to get right.
2018-11-18 17:23:14 +01:00
Geert Janssens
f13d21b973
Bug 498072 - GnuCash show taxes on invoice when individual taxes is not checked
...
Use more descriptive option name and tool tip as proposed in the bug.
2018-11-18 15:38:59 +01:00
Geert Janssens
ae862e6aa5
Bug 760825 - On duplicating a bill, the entry dates should be set to the bill date, not to the current date
2018-11-18 15:04:04 +01:00