From d6af28cc9019ecfcd4b86ad640775fc21a5b11eb Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 31 Jan 2016 14:37:58 +0200 Subject: Attempt to detect time format on CSV import This attempts to detect the time format when initially importing a CSV file. Well, only the minutes:seconds notation is detected currently. Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- desktop-widgets/divelogimportdialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'desktop-widgets/divelogimportdialog.cpp') diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index c99810a20..363be800e 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -527,6 +527,12 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) } else if (date.contains('/')) { ui->DateFormat->setCurrentText("mm/dd/yyyy"); } + } else if (foundHeading == QString::fromLatin1("Time") && columns.count() >= count) { + QString time = columns.at(count); + if (time.contains(':')) { + ui->DurationFormat->setCurrentText("Minutes:seconds"); + + } } } else { headers.append(""); -- cgit v1.2.3-70-g09d2