author | benmeyer <benmeyer> | 2002-10-18 18:12:53 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-18 18:12:53 (UTC) |
commit | a63b3b36cf4d665b67733e069bfaad8f96388276 (patch) (side-by-side diff) | |
tree | 0089ca8d5bacd31982d8bec367d091b4f58cace1 /noncore/net/networksetup/interfaces.cpp | |
parent | 5ec0d959ca9d3ade0c7271885028fd4309cf2b4c (diff) | |
download | opie-a63b3b36cf4d665b67733e069bfaad8f96388276.zip opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.gz opie-a63b3b36cf4d665b67733e069bfaad8f96388276.tar.bz2 |
interfaces now watches for # in most cases
Diffstat (limited to 'noncore/net/networksetup/interfaces.cpp') (more/less context) (ignore 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()); |