summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelogimportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-01-31 14:37:58 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-31 11:22:47 -0800
commitd6af28cc9019ecfcd4b86ad640775fc21a5b11eb (patch)
tree96b4fda27dccfee82da10d879a0fca6855910dff /desktop-widgets/divelogimportdialog.cpp
parentd9072cdefdd00bfddc28d40349fac1c48b2d58a4 (diff)
downloadsubsurface-d6af28cc9019ecfcd4b86ad640775fc21a5b11eb.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 'desktop-widgets/divelogimportdialog.cpp')
-rw-r--r--desktop-widgets/divelogimportdialog.cpp6
1 files changed, 6 insertions, 0 deletions
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("");