From a480d28afd7702cb27e99765779cb70736cdea45 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Mon, 2 May 2016 20:11:33 +0300 Subject: CSV import: use date field on profile import Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- desktop-widgets/divelogimportdialog.cpp | 6 ++++-- xslt/csv2xml.xslt | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index ecc2d24fb..a1ecf15b8 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -718,6 +718,8 @@ char *intdup(int index) int DiveLogImportDialog::setup_csv_params(QStringList r, char **params, int pnr) { + params[pnr++] = strdup("dateField"); + params[pnr++] = intdup(r.indexOf(tr("Date"))); params[pnr++] = strdup("timeField"); params[pnr++] = intdup(r.indexOf(tr("Sample time"))); params[pnr++] = strdup("depthField"); @@ -819,7 +821,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() sample->tts.seconds *= 60; } } else { - char *params[39]; + char *params[41]; int pnr = 0; pnr = setup_csv_params(r, params, pnr); @@ -886,7 +888,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() parse_manual_file(fileNames[i].toUtf8().data(), params, pnr - 1); } else { - char *params[39]; + char *params[41]; int pnr = 0; pnr = setup_csv_params(r, params, pnr); diff --git a/xslt/csv2xml.xslt b/xslt/csv2xml.xslt index 0f8362936..7dc4fa4be 100644 --- a/xslt/csv2xml.xslt +++ b/xslt/csv2xml.xslt @@ -2,6 +2,7 @@ + @@ -40,7 +41,17 @@ - + + + + + + + + + + + -- cgit v1.2.3-70-g09d2