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 <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-07-28 19:20:27 +03:00 committed by Dirk Hohndel
parent 96b612941e
commit 921041163b
2 changed files with 3 additions and 3 deletions

View file

@ -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"));
}