summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan/wlanmodule.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 371b689..7bded85 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -71,5 +71,5 @@ bool WLANModule::isOwner(Interface *i){
71 */ 71 */
72QWidget *WLANModule::configure(Interface *i){ 72QWidget *WLANModule::configure(Interface *i){
73 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose); 73 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, true, Qt::WDestructiveClose);
74 wlanconfig->setProfile(profile); 74 wlanconfig->setProfile(profile);
75 return wlanconfig; 75 return wlanconfig;
@@ -133,4 +133,5 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
133 QString interface; 133 QString interface;
134 QString action; 134 QString action;
135 QDialog *toShow;
135 while (! stream.atEnd() ){ 136 while (! stream.atEnd() ){
136 stream >> interface; 137 stream >> interface;
@@ -148,6 +149,6 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
148 if (ifa == 0){ 149 if (ifa == 0){
149 qDebug("WLANModule Did not find %s",interface.latin1()); 150 qDebug("WLANModule Did not find %s",interface.latin1());
150 qDebug("returning"); 151 qDebug("skipping");
151 return; 152 count = 0;
152 } 153 }
153 154
@@ -171,4 +172,5 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
171 //FIXME: what if it got closed meanwhile? 172 //FIXME: what if it got closed meanwhile?
172 wlanconfigWiget = (WLANImp*) configure(ifa); 173 wlanconfigWiget = (WLANImp*) configure(ifa);
174 toShow = (QDialog*) wlanconfigWiget;
173 } 175 }
174 wlanconfigWiget->showMaximized(); 176 wlanconfigWiget->showMaximized();
@@ -192,6 +194,10 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
192 194
193 }else if (action.contains("Channel")){ 195 }else if (action.contains("Channel")){
194 wlanconfigWiget->specifyChan->setChecked( true ); 196 bool ok;
195 wlanconfigWiget->networkChannel->setValue( value.toInt() ); 197 int chan = value.toInt( &ok );
198 if (ok){
199 wlanconfigWiget->specifyChan->setChecked( true );
200 wlanconfigWiget->networkChannel->setValue( chan );
201 }
196 }else if (action.contains("MacAddr")){ 202 }else if (action.contains("MacAddr")){
197 wlanconfigWiget->specifyAp->setChecked( true ); 203 wlanconfigWiget->specifyAp->setChecked( true );
@@ -201,4 +207,5 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
201 } 207 }
202 }// while stream 208 }// while stream
209 if (toShow) toShow->exec();
203} 210}
204 211