author | benmeyer <benmeyer> | 2002-10-18 14:28:42 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-18 14:28:42 (UTC) |
commit | 88b3a159060ed7057bfee4cc1ccfcf81a63a4780 (patch) (side-by-side diff) | |
tree | 3dd78d403f337c73bb3ca9d75ef0a29f2adae9b6 /noncore/net/networksetup/interfaces.cpp | |
parent | 461113126af82cd6343eedab36ecabb4253780ee (diff) | |
download | opie-88b3a159060ed7057bfee4cc1ccfcf81a63a4780.zip opie-88b3a159060ed7057bfee4cc1ccfcf81a63a4780.tar.gz opie-88b3a159060ed7057bfee4cc1ccfcf81a63a4780.tar.bz2 |
More profile stuff works
Diffstat (limited to 'noncore/net/networksetup/interfaces.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interfaces.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/noncore/net/networksetup/interfaces.cpp b/noncore/net/networksetup/interfaces.cpp index 1287d90..eef42df 100644 --- a/noncore/net/networksetup/interfaces.cpp +++ b/noncore/net/networksetup/interfaces.cpp @@ -347,5 +347,5 @@ bool Interfaces::setMapping(QString interface){ */ -void Interfaces::addMapping(QString interfaces){ +void Interfaces::addMapping(QString option){ interfaces.append(""); - interfaces.append(QString(MAPPING " %1").arg(interfaces)); + interfaces.append(QString(MAPPING " %1").arg(option)); } @@ -406,2 +406,3 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator } + qDebug("Found"); found = true; @@ -410,3 +411,3 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator } - return !found; + return found; } @@ -430,5 +431,6 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString } + found = true; break; } - if((*it).contains(option)){ + if((*it).contains(option) && it != start){ // Found it in stanza so replace it. @@ -443,3 +445,8 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString } - return true; + if(!found){ + QStringList::Iterator p = start; + interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); + found = true; + } + return found; } |