From 921041163be940d22ecffa5dc544add97c0bc0e1 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Tue, 28 Jul 2015 19:20:27 +0300 Subject: Seabear import: fix detection of empty lines The old code trusted in Windows new lines with length of 3. The new code strips out spaces and line ending chars resulting in empty line being of length 0. Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- tests/testparse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/testparse.cpp b/tests/testparse.cpp index 9288baf63..fa1d6d223 100644 --- a/tests/testparse.cpp +++ b/tests/testparse.cpp @@ -166,7 +166,7 @@ void TestParse::testParseNewFormat() */ f.open(QFile::ReadOnly); - while ((firstLine = f.readLine()).length() > 3 && !f.atEnd()) { + while ((firstLine = f.readLine().trimmed()).length() > 0 && !f.atEnd()) { if (firstLine.contains("//Log interval: ")) delta = firstLine.remove(QString::fromLatin1("//Log interval: ")).trimmed().remove(QString::fromLatin1(" s")); } -- cgit v1.2.3-70-g09d2