mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d9072cdefd
commit
d6af28cc90
1 changed files with 6 additions and 0 deletions
|
@ -527,6 +527,12 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
||||||
} else if (date.contains('/')) {
|
} else if (date.contains('/')) {
|
||||||
ui->DateFormat->setCurrentText("mm/dd/yyyy");
|
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 {
|
} else {
|
||||||
headers.append("");
|
headers.append("");
|
||||||
|
|
Loading…
Add table
Reference in a new issue