author | tille <tille> | 2003-06-16 17:07:09 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-16 17:07:09 (UTC) |
commit | 020c6d76b3faad399164ba196c51804221a259e1 (patch) (side-by-side diff) | |
tree | 7b9aef94a9ec3fad7a16201d56c4a4b32ac39a09 | |
parent | 3508149e0c894e53bc31ee7b66d98a195cdb8d70 (diff) | |
download | opie-020c6d76b3faad399164ba196c51804221a259e1.zip opie-020c6d76b3faad399164ba196c51804221a259e1.tar.gz opie-020c6d76b3faad399164ba196c51804221a259e1.tar.bz2 |
remove qFatal in case of unknow interface.
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index e34f0ce..371b689 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp @@ -117,65 +117,67 @@ bool WLANModule::remove(Interface*){ return false; } void WLANModule::receive(const QCString ¶m, const QByteArray &arg) { qDebug("WLANModule::receive "+param); QStringList params = QStringList::split(",",param); int count = params.count(); qDebug("WLANModule got %i params", count ); if (count < 2){ qDebug("Erorr less than 2 parameter"); qDebug("RETURNING"); return; } QDataStream stream(arg,IO_ReadOnly); QString interface; QString action; while (! stream.atEnd() ){ stream >> interface; stream >> action; qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); // find interfaces Interface *ifa=0; for ( Interface *i=list.first(); i != 0; i=list.next() ){ if (i->getInterfaceName() == interface){ qDebug("WLANModule found interface %s",interface.latin1()); ifa = i; } } if (ifa == 0){ - qFatal("WLANModule Did not find %s",interface.latin1()); + qDebug("WLANModule Did not find %s",interface.latin1()); + qDebug("returning"); + return; } if (count == 2){ // those should call the interface directly QWidget *info = getInfo( ifa ); info->showMaximized(); if ( action.contains("start" ) ){ ifa->start(); } else if ( action.contains("restart" ) ){ ifa->restart(); } else if ( action.contains("stop" ) ){ ifa->stop(); }else if ( action.contains("refresh" ) ){ ifa->refresh(); } }else if (count == 3){ QString value; if (!wlanconfigWiget){ //FIXME: what if it got closed meanwhile? wlanconfigWiget = (WLANImp*) configure(ifa); } wlanconfigWiget->showMaximized(); stream >> value; qDebug("WLANModule is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); if ( action.contains("ESSID") ){ QComboBox *combo = wlanconfigWiget->essid; bool found = false; for ( int i = 0; i < combo->count(); i++) if ( combo->text( i ) == value ){ combo->setCurrentItem( i ); found = true; |