diff options
author | 2016-01-31 14:37:58 +0200 | |
---|---|---|
committer | 2016-02-26 09:23:19 +0100 | |
commit | 43ec76283bc9c3ccac6fdf46611b87fbcf852e06 (patch) | |
tree | f3c6cc2166fb4d6c373cfdf501b1d01384a173cd /qt-ui | |
parent | 3c83b2218b1e6806427f06585ed3fab2f5ee3641 (diff) | |
download | subsurface-43ec76283bc9c3ccac6fdf46611b87fbcf852e06.tar.gz |
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 <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index e6b3b9a5c..67faadf91 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/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(""); |