Diffstat (limited to 'noncore/net/networksetup/mainwindowimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index b46362f..117bac1 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -306,2 +306,4 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
306 | Interface *i; | 306 | Interface *i; |
307 | // We have found an interface | ||
308 | //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1()); | ||
307 | // See if we already have it | 309 | // See if we already have it |
@@ -309,14 +311,6 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
309 | if(fileName == TEMP_ALL) | 311 | if(fileName == TEMP_ALL) |
310 | i = new Interface(interfaceName, false); | 312 | i = new Interface(this, interfaceName, false); |
311 | else | 313 | else |
312 | i = new Interface(interfaceName, true); | 314 | i = new Interface(this, interfaceName, true); |
313 | } | ||
314 | else{ | ||
315 | i = interfaceNames[interfaceName]; | ||
316 | if(fileName != TEMP_ALL) | ||
317 | i->setStatus(true); | ||
318 | } | ||
319 | |||
320 | i->setAttached(true); | 315 | i->setAttached(true); |
321 | i->setInterfaceName(interfaceName); | ||
322 | 316 | ||
@@ -329,6 +323,13 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
329 | i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName())); | 323 | i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName())); |
330 | // We have found an interface | 324 | |
331 | //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1()); | ||
332 | interfaceNames.insert(i->getInterfaceName(), i); | 325 | interfaceNames.insert(i->getInterfaceName(), i); |
333 | updateInterface(i); | 326 | updateInterface(i); |
327 | connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); | ||
328 | } | ||
329 | // It was an interface we already had. | ||
330 | else{ | ||
331 | i = interfaceNames[interfaceName]; | ||
332 | if(fileName != TEMP_ALL) | ||
333 | i->setStatus(true); | ||
334 | } | ||
334 | } | 335 | } |
@@ -349,8 +350,8 @@ void MainWindowImp::jobDone(KProcess *process){ | |||
349 | if(!found){ | 350 | if(!found){ |
350 | Interface *i = new Interface(*ni, false); | 351 | Interface *i = new Interface(this, *ni, false); |
351 | i->setAttached(false); | 352 | i->setAttached(false); |
352 | i->setHardwareName(QString("Disconnected (%1)").arg(*ni)); | 353 | i->setHardwareName(QString("Disconnected (%1)").arg(*ni)); |
353 | i->setInterfaceName(*ni); | ||
354 | interfaceNames.insert(i->getInterfaceName(), i); | 354 | interfaceNames.insert(i->getInterfaceName(), i); |
355 | updateInterface(i); | 355 | updateInterface(i); |
356 | connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *))); | ||
356 | } | 357 | } |
@@ -397,2 +398,4 @@ void MainWindowImp::updateInterface(Interface *i){ | |||
397 | typeName = "wlan"; | 398 | typeName = "wlan"; |
399 | if(i->getInterfaceName().contains("usb")) | ||
400 | typeName = "usb"; | ||
398 | 401 | ||