diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-05-02 20:11:36 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-05-02 10:25:07 -0700 |
commit | 7ec83ef02a7216bd2de19798d250df8540b90b38 (patch) | |
tree | 7be28957bafaabb2eeb0e4b344f438a189d65d8c /desktop-widgets/divelogimportdialog.cpp | |
parent | a83c674139562010e9b9ee281b121ed4434c8a5a (diff) | |
download | subsurface-7ec83ef02a7216bd2de19798d250df8540b90b38.tar.gz |
CSV import: import time field if available
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/divelogimportdialog.cpp')
-rw-r--r-- | desktop-widgets/divelogimportdialog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index 854a522f2..90a466c9a 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -722,6 +722,8 @@ int DiveLogImportDialog::setup_csv_params(QStringList r, char **params, int pnr) params[pnr++] = intdup(r.indexOf(tr("Date"))); params[pnr++] = strdup("datefmt"); params[pnr++] = intdup(ui->DateFormat->currentIndex()); + params[pnr++] = strdup("starttimeField"); + params[pnr++] = intdup(r.indexOf(tr("Time"))); params[pnr++] = strdup("timeField"); params[pnr++] = intdup(r.indexOf(tr("Sample time"))); params[pnr++] = strdup("depthField"); @@ -823,7 +825,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() sample->tts.seconds *= 60; } } else { - char *params[43]; + char *params[45]; int pnr = 0; pnr = setup_csv_params(r, params, pnr); @@ -890,7 +892,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() parse_manual_file(fileNames[i].toUtf8().data(), params, pnr - 1); } else { - char *params[43]; + char *params[45]; int pnr = 0; pnr = setup_csv_params(r, params, pnr); |