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>
This commit is contained in:
Miika Turkia 2015-03-10 22:18:58 +02:00 committed by Dirk Hohndel
parent 55582cf5d4
commit 76ce2b095b

View file

@ -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;