From 7d120ccd0a3f84292908246c30db0a7acf2fae0d Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Tue, 1 Dec 2020 09:46:11 +0100 Subject: [PATCH] minor fix to avoid empty lines --- sources/backend/linbobackend.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/backend/linbobackend.cpp b/sources/backend/linbobackend.cpp index 16a519a..6df2b78 100644 --- a/sources/backend/linbobackend.cpp +++ b/sources/backend/linbobackend.cpp @@ -426,18 +426,18 @@ void LinboBackend::loadStartConfiguration(QString startConfFilePath) { while(!input.atEnd()) { QString thisLine = input.readLine(); - // ignore comments and empty lines - if(thisLine.startsWith("#")||thisLine.isEmpty()) - continue; - // Remove comments from the end of the line + // Remove comments thisLine = thisLine.split("#")[0]; // ignore capitalization thisLine = thisLine.toLower(); // remove empty characters thisLine = thisLine.stripWhiteSpace(); thisLine = thisLine.simplified(); + // ignore empty lines + if(thisLine.length() == 0) + continue; - qDebug() << "reading line: " << thisLine; + //qDebug() << "reading line: " << thisLine; if(thisLine.startsWith("[")) { // we found a new section!