diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-03-10 22:18:58 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-03-10 14:27:43 -0700 |
commit | 76ce2b095bbad46b4804dd075bee22085c606543 (patch) | |
tree | 5356ed9d134e30d7704d1e96d3428034407d2749 | |
parent | 55582cf5d4b191c524bee694bfcc9e9b6694f214 (diff) | |
download | subsurface-76ce2b095bbad46b4804dd075bee22085c606543.tar.gz |
Trim CSV lines on import
In practice this will sanitize Windows line terminations (discard the
carriage return);
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |