diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2016-05-02 20:11:33 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-05-02 10:24:52 -0700 |
commit | a480d28afd7702cb27e99765779cb70736cdea45 (patch) | |
tree | a4fdbbed8d0b0febf02d05fc06ba3998c5370e43 /desktop-widgets/divelogimportdialog.cpp | |
parent | 98f93be0c4168d42a6b2f2fa9bd3fcc9f9d9a4f7 (diff) | |
download | subsurface-a480d28afd7702cb27e99765779cb70736cdea45.tar.gz |
CSV import: use date field on profile import
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 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); |