gnucash maint: Change from deprecated gncEntrySetDate to gncEntrySetDateGDate. Again.
Mike Evans
mikee at code.gnucash.org
Sun May 21 10:54:26 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/e43e30d0 (commit)
from https://github.com/Gnucash/gnucash/commit/9591c52b (commit)
commit e43e30d0390653493d680191605b64fcf774c255
Author: Mike Evans <mikee at saxicola.co.uk>
Date: Sun May 21 15:49:30 2017 +0100
Change from deprecated gncEntrySetDate to gncEntrySetDateGDate.
Again.
diff --git a/src/plugins/bi_import/dialog-bi-import.c b/src/plugins/bi_import/dialog-bi-import.c
index 39803b0..4b536c5 100644
--- a/src/plugins/bi_import/dialog-bi-import.c
+++ b/src/plugins/bi_import/dialog-bi-import.c
@@ -706,13 +706,14 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
timespecFromTime64 (&today, gnc_time (NULL)); // set today to the current date
if (strlen (date) != 0) // If a date is specified in CSV
{
- qof_scan_date (date, &day, &month, &year); // FIXME: Must check for the return value of qof_scan_date!
- gncEntrySetDate(entry, gnc_dmy2timespec (day, month, year));
+ GDate *date = g_date_new_dmy(day, month, year);
+ gncEntrySetDateGDate(entry, date);
gncEntrySetDateEntered(entry, gnc_dmy2timespec (day, month, year));
}
else
{
- gncEntrySetDate(entry, today); // TODO: DEPRECATED - use gncEntrySetDateGDate() instead!
+ GDate *date = gnc_g_date_new_today();
+ gncEntrySetDateGDate(entry, date); // TODO: DEPRECATED - use gncEntrySetDateGDate() instead!
gncEntrySetDateEntered(entry, today);
}
// Remove escaped quotes
Summary of changes:
src/plugins/bi_import/dialog-bi-import.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
More information about the gnucash-changes
mailing list