diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-01-24 17:03:17 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-24 14:51:14 -0800 |
commit | 14f96fc4ded335ace92e42b51a6420da02689f66 (patch) | |
tree | e105eb74479c2f52da1a427f2d4059dc3593be9d /qt-ui/divelogimportdialog.cpp | |
parent | 8e75243a5bdd5316b18379b71971e9a139382617 (diff) | |
download | subsurface-14f96fc4ded335ace92e42b51a6420da02689f66.tar.gz |
Match ₂ to 2 and cylinder to cyl. on CSV import
This improves the column name matching so our own columns are properly
supported.
See #814
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index ecd09bc57..ada1fc438 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -419,6 +419,8 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) Q_FOREACH (QString columnText, currColumns) { columnText.replace("\"", ""); columnText.replace("number", "#", Qt::CaseInsensitive); + columnText.replace("2", "₂", Qt::CaseInsensitive); + columnText.replace("cylinder", "cyl.", Qt::CaseInsensitive); int idx = provider->mymatch(columnText); if (idx >= 0) { QString foundHeading = provider->data(provider->index(idx, 0), Qt::DisplayRole).toString(); |