diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-05-02 20:11:35 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-05-02 10:25:03 -0700 |
commit | a83c674139562010e9b9ee281b121ed4434c8a5a (patch) | |
tree | 32bc4a0fc779a2f9ccb10e972cc08acadc3e29e9 /desktop-widgets/divelogimportdialog.cpp | |
parent | 43f911242032982a2456ef8f7fc0d8a3a1d3dd6b (diff) | |
download | subsurface-a83c674139562010e9b9ee281b121ed4434c8a5a.tar.gz |
CSV import: support for user specified date format
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 a1ecf15b8..854a522f2 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -720,6 +720,8 @@ 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("datefmt"); + params[pnr++] = intdup(ui->DateFormat->currentIndex()); params[pnr++] = strdup("timeField"); params[pnr++] = intdup(r.indexOf(tr("Sample time"))); params[pnr++] = strdup("depthField"); @@ -821,7 +823,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() sample->tts.seconds *= 60; } } else { - char *params[41]; + char *params[43]; int pnr = 0; pnr = setup_csv_params(r, params, pnr); @@ -888,7 +890,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() parse_manual_file(fileNames[i].toUtf8().data(), params, pnr - 1); } else { - char *params[41]; + char *params[43]; int pnr = 0; pnr = setup_csv_params(r, params, pnr); |