summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/interfaces/interfaces.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/networksetup/interfaces/interfaces.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/networksetup/interfaces/interfaces.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/networksetup/interfaces/interfaces.cpp b/noncore/net/networksetup/interfaces/interfaces.cpp
index e49998e..8f685fe 100644
--- a/noncore/net/networksetup/interfaces/interfaces.cpp
+++ b/noncore/net/networksetup/interfaces/interfaces.cpp
@@ -68,13 +68,13 @@ QStringList Interfaces::getInterfaceList(){
/**
* Find out if interface is in an "auto" group or not.
* Report any duplicates such as eth0 being in two differnt auto's
* @param interface interface to check to see if it is on or not.
* @return true is interface is in auto
*/
-bool Interfaces::isAuto(const QString &interface){
+bool Interfaces::isAuto(const QString &interface) const {
QStringList autoLines = interfaces.grep(QRegExp(AUTO));
QStringList awi = autoLines.grep(QRegExp(interface));
if(awi.count() > 1)
qDebug(QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1());
if(awi.count() < 1)
return false;
@@ -136,14 +136,14 @@ bool Interfaces::setInterface(QString interface){
}
/**
* A quick helper funtion to see if the current interface is set.
* @return bool true if set, false otherwise.
*/
-bool Interfaces::isInterfaceSet(){
- return (currentIface != interfaces.end());
+bool Interfaces::isInterfaceSet() const {
+ return (interfaces.end() != currentIface);
}
/**
* Add a new interface of with the settings - family and method
* @param interface the name of the interface to set. All whitespace is
* removed from the interface name.