From c48af71638614aaff280178693448916e0e98102 Mon Sep 17 00:00:00 2001 From: schurig Date: Fri, 13 Jun 2003 10:49:17 +0000 Subject: little simplificatin -> less code size --- (limited to 'noncore') diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index 8d3e151..a62a90c 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp @@ -23,7 +23,7 @@ Interfaces::Interfaces(QString useInterfacesFile){ interfacesFile = useInterfacesFile; QFile file(interfacesFile); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interfaces: Can't open file: %1 for reading.").arg(interfacesFile).latin1()); + qDebug("Interfaces: Can't open file: %s for reading.", interfacesFile.latin1() ); currentIface = interfaces.end(); currentMapping = interfaces.end(); return; @@ -67,7 +67,7 @@ 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 + * 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 */ @@ -76,9 +76,7 @@ bool Interfaces::isAuto(const QString &interface) const { 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; - return true; + return awi.count() > 0; } /** -- cgit v0.9.0.2