Diffstat (limited to 'noncore/net/networksetup/interfaces.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interfaces.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/networksetup/interfaces.cpp b/noncore/net/networksetup/interfaces.cpp index 9155890..377a6db 100644 --- a/noncore/net/networksetup/interfaces.cpp +++ b/noncore/net/networksetup/interfaces.cpp @@ -52,5 +52,5 @@ QStringList Interfaces::getInterfaceList(){ for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { QString line = (*it).simplifyWhiteSpace(); - if(line.contains(IFACE)){ + if(line.contains(IFACE) && line.at(0) != '#'){ line = line.mid(QString(IFACE).length() +1, line.length()); line = line.simplifyWhiteSpace(); @@ -458,5 +458,5 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { QString line = (*it).simplifyWhiteSpace(); - if(line.contains(stanza) && line.contains(option)){ + if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ uint point = line.find(option); bool valid = true; @@ -504,5 +504,5 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString break; } - if((*it).contains(option) && it != start){ + if((*it).contains(option) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) @@ -535,5 +535,5 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri break; } - if((*it).contains(option) && (*it).contains(value) &&it != start){ + if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) @@ -588,5 +588,5 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool break; } - if((*it).contains(option)){ + if((*it).contains(option) && (*it).at(0) != '#'){ if(found) qDebug(QString("Interfaces: Get Options found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); |