From 14f96fc4ded335ace92e42b51a6420da02689f66 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sat, 24 Jan 2015 17:03:17 +0200 Subject: Match ₂ to 2 and cylinder to cyl. on CSV import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This improves the column name matching so our own columns are properly supported. See #814 Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/divelogimportdialog.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui') 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(); -- cgit v1.2.3-70-g09d2