author | simon <simon> | 2002-11-08 15:17:49 (UTC) |
---|---|---|
committer | simon <simon> | 2002-11-08 15:17:49 (UTC) |
commit | 447735be20fad2642617e3ba4f7ef0b598f597db (patch) (side-by-side diff) | |
tree | 2627703ed5020debe5c408f42e31841618fbb47c | |
parent | c2d39953b626147400114dbde85d87bdf5081576 (diff) | |
download | opie-447735be20fad2642617e3ba4f7ef0b598f597db.zip opie-447735be20fad2642617e3ba4f7ef0b598f597db.tar.gz opie-447735be20fad2642617e3ba4f7ef0b598f597db.tar.bz2 |
- fix some more gcc3 warnings by removing statements with no effect:
- for ( it; it != interfaces.end(); ++it ){
+ for ( ; it != interfaces.end(); ++it ){
-rw-r--r-- | noncore/net/networksetup/interfaces/interfaces.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaces/interfaces.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/networksetup/interfaces/interfaces.cpp b/noncore/net/networksetup/interfaces/interfaces.cpp index 377a6db..f1b8067 100644 --- a/noncore/net/networksetup/interfaces/interfaces.cpp +++ b/noncore/net/networksetup/interfaces/interfaces.cpp @@ -162,49 +162,49 @@ bool Interfaces::addInterface(QString interface, QString family, QString method) interface = interface.simplifyWhiteSpace(); interface = interface.replace(QRegExp(" "), ""); interfaces.append(""); interfaces.append(QString(IFACE " %1 %2 %3").arg(interface).arg(family).arg(method)); return true; } /** * Copies interface with name interface to name newInterface * @param newInterface name of the new interface. * @return bool true if successfull */ bool Interfaces::copyInterface(QString interface, QString newInterface){ if(!setInterface(interface)) return false; QStringList::Iterator it = currentIface; it++; bool error; addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); if(!setInterface(newInterface)) return false; QStringList::Iterator newIface = currentIface; newIface++; - for ( it; it != interfaces.end(); ++it ){ + for ( ; it != interfaces.end(); ++it ){ if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) break; newIface = interfaces.insert(newIface, *it); } return true; } /** * Remove the currently selected interface and all of its options. * @return bool if successfull or not. */ bool Interfaces::removeInterface(){ if(currentIface == interfaces.end()) return false; (*currentIface) = ""; return removeAllInterfaceOptions(); } /** * Gets the hardware name of the interface that is currently selected. * @return QString name of the hardware interface (eth0, usb2, wlan1...). * @param error set to true if any error occurs, false otherwise. */ @@ -535,49 +535,49 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri break; } if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); found = true; (*it) = ""; } } return found; } /** * Removes all options in a stanza * @param start the start of the stanza * @return bool true if successfull, false otherwise. */ bool Interfaces::removeAllOptions(QStringList::Iterator start){ if(start == interfaces.end()) return false; QStringList::Iterator it = start; it = ++it; - for (it; it != interfaces.end(); ++it ) { + for (; it != interfaces.end(); ++it ) { if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ break; } it = interfaces.remove(it); it = --it; } // Leave a space between this interface and the next. interfaces.insert(it, QString("")); return true; } /** * Gets a value of an option in a stanza * @param start the start of the stanza * @param option the option to use when getting the value. * @param bool true if errors false otherwise. * @return QString the value of option QString::null() if error == true. */ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool &error){ if(start == interfaces.end()){ error = false; return QString(); } diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index 377a6db..f1b8067 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp @@ -162,49 +162,49 @@ bool Interfaces::addInterface(QString interface, QString family, QString method) interface = interface.simplifyWhiteSpace(); interface = interface.replace(QRegExp(" "), ""); interfaces.append(""); interfaces.append(QString(IFACE " %1 %2 %3").arg(interface).arg(family).arg(method)); return true; } /** * Copies interface with name interface to name newInterface * @param newInterface name of the new interface. * @return bool true if successfull */ bool Interfaces::copyInterface(QString interface, QString newInterface){ if(!setInterface(interface)) return false; QStringList::Iterator it = currentIface; it++; bool error; addInterface(newInterface, getInterfaceFamily(error), getInterfaceMethod(error)); if(!setInterface(newInterface)) return false; QStringList::Iterator newIface = currentIface; newIface++; - for ( it; it != interfaces.end(); ++it ){ + for ( ; it != interfaces.end(); ++it ){ if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO))) break; newIface = interfaces.insert(newIface, *it); } return true; } /** * Remove the currently selected interface and all of its options. * @return bool if successfull or not. */ bool Interfaces::removeInterface(){ if(currentIface == interfaces.end()) return false; (*currentIface) = ""; return removeAllInterfaceOptions(); } /** * Gets the hardware name of the interface that is currently selected. * @return QString name of the hardware interface (eth0, usb2, wlan1...). * @param error set to true if any error occurs, false otherwise. */ @@ -535,49 +535,49 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri break; } if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); found = true; (*it) = ""; } } return found; } /** * Removes all options in a stanza * @param start the start of the stanza * @return bool true if successfull, false otherwise. */ bool Interfaces::removeAllOptions(QStringList::Iterator start){ if(start == interfaces.end()) return false; QStringList::Iterator it = start; it = ++it; - for (it; it != interfaces.end(); ++it ) { + for (; it != interfaces.end(); ++it ) { if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ break; } it = interfaces.remove(it); it = --it; } // Leave a space between this interface and the next. interfaces.insert(it, QString("")); return true; } /** * Gets a value of an option in a stanza * @param start the start of the stanza * @param option the option to use when getting the value. * @param bool true if errors false otherwise. * @return QString the value of option QString::null() if error == true. */ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool &error){ if(start == interfaces.end()){ error = false; return QString(); } |