From 76ce2b095bbad46b4804dd075bee22085c606543 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Tue, 10 Mar 2015 22:18:58 +0200 Subject: Trim CSV lines on import In practice this will sanitize Windows line terminations (discard the carriage return); Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/divelogimportdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/divelogimportdialog.cpp') diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index ce12ef7ec..cb6225f57 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -514,7 +514,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) } while (rows < 10 && !f.atEnd()) { - QString currLine = f.readLine(); + QString currLine = f.readLine().trimmed(); currColumns = currLine.split(separator); fileColumns.append(currColumns); rows += 1; -- cgit v1.2.3-70-g09d2