minor fix to avoid empty lines
This commit is contained in:
parent
48dacb4e7e
commit
7d120ccd0a
1 changed files with 5 additions and 5 deletions
|
@ -426,18 +426,18 @@ void LinboBackend::loadStartConfiguration(QString startConfFilePath) {
|
||||||
while(!input.atEnd()) {
|
while(!input.atEnd()) {
|
||||||
QString thisLine = input.readLine();
|
QString thisLine = input.readLine();
|
||||||
|
|
||||||
// ignore comments and empty lines
|
// Remove comments
|
||||||
if(thisLine.startsWith("#")||thisLine.isEmpty())
|
|
||||||
continue;
|
|
||||||
// Remove comments from the end of the line
|
|
||||||
thisLine = thisLine.split("#")[0];
|
thisLine = thisLine.split("#")[0];
|
||||||
// ignore capitalization
|
// ignore capitalization
|
||||||
thisLine = thisLine.toLower();
|
thisLine = thisLine.toLower();
|
||||||
// remove empty characters
|
// remove empty characters
|
||||||
thisLine = thisLine.stripWhiteSpace();
|
thisLine = thisLine.stripWhiteSpace();
|
||||||
thisLine = thisLine.simplified();
|
thisLine = thisLine.simplified();
|
||||||
|
// ignore empty lines
|
||||||
|
if(thisLine.length() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
qDebug() << "reading line: " << thisLine;
|
//qDebug() << "reading line: " << thisLine;
|
||||||
|
|
||||||
if(thisLine.startsWith("[")) {
|
if(thisLine.startsWith("[")) {
|
||||||
// we found a new section!
|
// we found a new section!
|
||||||
|
|
Reference in a new issue