author | zecke <zecke> | 2004-09-10 11:16:54 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-10 11:16:54 (UTC) |
commit | 59dbb076579e0387f960525b415511946eb83b17 (patch) (side-by-side diff) | |
tree | dc8caeebf7e5a1968a399838b53cb09a1537d9ec /noncore/settings/networksettings/ppp/pppmodule.cpp | |
parent | b8baf551919868737c6f56a05e6efa1bad4d97ac (diff) | |
download | opie-59dbb076579e0387f960525b415511946eb83b17.zip opie-59dbb076579e0387f960525b415511946eb83b17.tar.gz opie-59dbb076579e0387f960525b415511946eb83b17.tar.bz2 |
Fix the issues the compilers bothers
remove unused parameters, give return values on return
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index fb279ee..dec0177 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp @@ -60,24 +60,24 @@ PPPModule::PPPModule() : Module() QMap<QString,Connection> running = inFace.interfaces(); QStringList handledInterfaceNames; QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces(); QMap<QString,QString>::Iterator it; InterfacePPP *iface; - odebug << "getting interfaces" << oendl; + odebug << "getting interfaces" << oendl; for( it = ifaces.begin(); it != ifaces.end(); ++it ) { - odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl; + odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl; iface = new InterfacePPP( 0, it.key() ); iface->setHardwareName( it.data() ); list.append( (Interface*)iface ); // check if (*it) is one of the running ifaces if ( running.contains( it.data() ) ) { - odebug << "iface is running " << it.key().latin1() << "" << oendl; + odebug << "iface is running " << it.key().latin1() << "" << oendl; handledInterfaceNames << running[it.data()].device; iface->setStatus( true ); iface->setPPPDpid( running[it.data()].pid ); iface->modem()->setPPPDevice( running[it.data()].device ); iface->refresh(); } @@ -88,22 +88,22 @@ PPPModule::PPPModule() : Module() /** * Delete any interfaces that we own. */ PPPModule::~PPPModule() { - odebug << "PPPModule::~PPPModule() " << oendl; + odebug << "PPPModule::~PPPModule() " << oendl; QMap<QString,QString> ifaces; InterfaceKeeper keeper; Interface *i; for ( i=list.first(); i != 0; i=list.next() ) { /* if online save the state */ if ( i->getStatus() ) { - odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl; + odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl; InterfacePPP* ppp = static_cast<InterfacePPP*>(i); keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() ); } ifaces.insert( i->getInterfaceName(), i->getHardwareName() ); delete i; } @@ -141,13 +141,13 @@ bool PPPModule::isOwner(Interface *i) /** * Create, and return the WLANConfigure Module * @return QWidget* pointer to this modules configure. */ QWidget *PPPModule::configure(Interface *i) { - odebug << "return ModemWidget" << oendl; + odebug << "return ModemWidget" << oendl; PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, 0, "PPPConfig", false, ::Qt::WDestructiveClose | ::Qt::WStyle_ContextHelp); return pppconfig; } @@ -168,24 +168,25 @@ QWidget *PPPModule::information(Interface *i) * @return QList<Interface> A list of interfaces that exsist that havn't * been called by isOwner() */ QList<Interface> PPPModule::getInterfaces() { // List all of the files in the peer directory - odebug << "PPPModule::getInterfaces" << oendl; + odebug << "PPPModule::getInterfaces" << oendl; return list; } /** * Attempt to add a new interface as defined by name - * @param name the name of the type of interface that should be created given + * @param newInterface the name of the type of interface that should be created given * by possibleNewInterfaces(); * @return Interface* NULL if it was unable to be created. */ Interface *PPPModule::addNewInterface(const QString &newInterface) { + Q_CONST_UNUSED( newInterface ) InterfacePPP *ifaceppp; Interface *iface; ifaceppp = new InterfacePPP(); PPPConfigWidget imp(ifaceppp, 0, "PPPConfigImp", true); @@ -261,26 +262,26 @@ namespace { Connection con; cfg.setGroup( (*it) ); con.name = (*it); con.pid = cfg.readNumEntry("pid"); con.device = cfg.readEntry("device"); - odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl; + odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl; if ( con.pid != -1 && isAvailable( con.pid ) ) ifaces.insert( con.name, con ); } return ifaces; } bool InterfaceKeeper::isAvailable( pid_t p)const { if (::kill(p, 0 ) == 0 || errno != ESRCH ) { - odebug << "isAvailable " << p << "" << oendl; + odebug << "isAvailable " << p << "" << oendl; return true; } - odebug << "notAvailable " << p << "" << oendl; + odebug << "notAvailable " << p << "" << oendl; return false; } } |