Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 1e16b97..3e1a650 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -78,9 +78,9 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWi | |||
78 | * we need to ignore it as well | 78 | * we need to ignore it as well |
79 | */ | 79 | */ |
80 | if (m_handledIfaces.contains( *ni) ) | 80 | if (m_handledIfaces.contains( *ni) ) |
81 | { | 81 | { |
82 | qDebug("Not up iface handled by module"); | 82 | odebug << "Not up iface handled by module" << oendl; |
83 | continue; | 83 | continue; |
84 | } | 84 | } |
85 | bool found = false; | 85 | bool found = false; |
86 | for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ) | 86 | for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ) |
@@ -218,9 +218,9 @@ void MainWindowImp::getAllInterfaces() | |||
218 | { | 218 | { |
219 | int flags = 0; | 219 | int flags = 0; |
220 | if ( m_handledIfaces.contains( (*it) ) ) | 220 | if ( m_handledIfaces.contains( (*it) ) ) |
221 | { | 221 | { |
222 | qDebug(" %s is handled by a module", (*it).latin1() ); | 222 | odebug << " " << (*it).latin1() << " is handled by a module" << oendl; |
223 | continue; | 223 | continue; |
224 | } | 224 | } |
225 | // int family; | 225 | // int family; |
226 | i = NULL; | 226 | i = NULL; |
@@ -248,9 +248,9 @@ void MainWindowImp::getAllInterfaces() | |||
248 | i->setHardwareName("Loopback"); | 248 | i->setHardwareName("Loopback"); |
249 | else | 249 | else |
250 | i->setHardwareName("Unknown"); | 250 | i->setHardwareName("Unknown"); |
251 | 251 | ||
252 | qWarning("Adding interface %s to interfaceNames\n", ifr.ifr_name); | 252 | owarn << "Adding interface " << ifr.ifr_name << " to interfaceNames\n" << oendl; |
253 | interfaceNames.insert(i->getInterfaceName(), i); | 253 | interfaceNames.insert(i->getInterfaceName(), i); |
254 | updateInterface(i); | 254 | updateInterface(i); |
255 | connect(i, SIGNAL(updateInterface(Interface*)), | 255 | connect(i, SIGNAL(updateInterface(Interface*)), |
256 | this, SLOT(updateInterface(Interface*))); | 256 | this, SLOT(updateInterface(Interface*))); |
@@ -264,9 +264,9 @@ void MainWindowImp::getAllInterfaces() | |||
264 | { | 264 | { |
265 | ilist = it.key()->getInterfaces(); | 265 | ilist = it.key()->getInterfaces(); |
266 | for( i = ilist.first(); i != 0; i = ilist.next() ) | 266 | for( i = ilist.first(); i != 0; i = ilist.next() ) |
267 | { | 267 | { |
268 | qWarning("Adding interface %s to interfaceNames\n", i->getInterfaceName().latin1() ); | 268 | owarn << "Adding interface " << i->getInterfaceName().latin1() << " to interfaceNames\n" << oendl; |
269 | interfaceNames.insert(i->getInterfaceName(), i); | 269 | interfaceNames.insert(i->getInterfaceName(), i); |
270 | updateInterface(i); | 270 | updateInterface(i); |
271 | connect(i, SIGNAL(updateInterface(Interface*)), | 271 | connect(i, SIGNAL(updateInterface(Interface*)), |
272 | this, SLOT(updateInterface(Interface*))); | 272 | this, SLOT(updateInterface(Interface*))); |
@@ -282,9 +282,9 @@ void MainWindowImp::getAllInterfaces() | |||
282 | */ | 282 | */ |
283 | void MainWindowImp::loadModules(const QString &path) | 283 | void MainWindowImp::loadModules(const QString &path) |
284 | { | 284 | { |
285 | #ifdef DEBUG | 285 | #ifdef DEBUG |
286 | qDebug("MainWindowImp::loadModules: %s", path.latin1()); | 286 | odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl; |
287 | #endif | 287 | #endif |
288 | QDir d(path); | 288 | QDir d(path); |
289 | if(!d.exists()) | 289 | if(!d.exists()) |
290 | return; | 290 | return; |
@@ -303,9 +303,9 @@ void MainWindowImp::loadModules(const QString &path) | |||
303 | if(fi->fileName().contains(".so") && fi->fileName().contains("networksettings_")) | 303 | if(fi->fileName().contains(".so") && fi->fileName().contains("networksettings_")) |
304 | { | 304 | { |
305 | #endif | 305 | #endif |
306 | loadPlugin(path + "/" + fi->fileName()); | 306 | loadPlugin(path + "/" + fi->fileName()); |
307 | qDebug("loaded plugin: >%s< ",QString(path + "/" + fi->fileName()).latin1()); | 307 | odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl; |
308 | } | 308 | } |
309 | ++it; | 309 | ++it; |
310 | } | 310 | } |
311 | } | 311 | } |
@@ -318,17 +318,17 @@ void MainWindowImp::loadModules(const QString &path) | |||
318 | */ | 318 | */ |
319 | Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString) | 319 | Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString) |
320 | { | 320 | { |
321 | #ifdef DEBUG | 321 | #ifdef DEBUG |
322 | qDebug("MainWindowImp::loadPlugin: %s: resolving %s", pluginFileName.latin1(), resolveString.latin1()); | 322 | odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl; |
323 | #endif | 323 | #endif |
324 | #ifdef QWS | 324 | #ifdef QWS |
325 | QLibrary *lib = new QLibrary(pluginFileName); | 325 | QLibrary *lib = new QLibrary(pluginFileName); |
326 | void *functionPointer = lib->resolve(resolveString); | 326 | void *functionPointer = lib->resolve(resolveString); |
327 | if( !functionPointer ) | 327 | if( !functionPointer ) |
328 | { | 328 | { |
329 | #ifdef DEBUG | 329 | #ifdef DEBUG |
330 | qDebug("MainWindowImp::loadPlugin: Warning: %s is not a plugin", pluginFileName.latin1()); | 330 | odebug << "MainWindowImp::loadPlugin: Warning: " << pluginFileName.latin1() << " is not a plugin" << oendl; |
331 | #endif | 331 | #endif |
332 | delete lib; | 332 | delete lib; |
333 | return NULL; | 333 | return NULL; |
334 | } | 334 | } |
@@ -336,9 +336,9 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & | |||
336 | Module *object = ((Module* (*)()) functionPointer)(); | 336 | Module *object = ((Module* (*)()) functionPointer)(); |
337 | if(object == NULL) | 337 | if(object == NULL) |
338 | { | 338 | { |
339 | #ifdef DEBUG | 339 | #ifdef DEBUG |
340 | qDebug("MainWindowImp: Couldn't create object, but did load library!"); | 340 | odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl; |
341 | #endif | 341 | #endif |
342 | delete lib; | 342 | delete lib; |
343 | return NULL; | 343 | return NULL; |
344 | } | 344 | } |
@@ -351,22 +351,22 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & | |||
351 | #else | 351 | #else |
352 | QLibrary *lib = loader->library(pluginFileName); | 352 | QLibrary *lib = loader->library(pluginFileName); |
353 | if( !lib || !lib->hasSymbol(resolveString) ) | 353 | if( !lib || !lib->hasSymbol(resolveString) ) |
354 | { | 354 | { |
355 | qDebug(QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); | 355 | odebug << QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1() << oendl; |
356 | return NULL; | 356 | return NULL; |
357 | } | 357 | } |
358 | // Try to get an object. | 358 | // Try to get an object. |
359 | Module *object = ((Module* (*)()) lib->symbol(resolveString))(); | 359 | Module *object = ((Module* (*)()) lib->symbol(resolveString))(); |
360 | if(object == NULL) | 360 | if(object == NULL) |
361 | { | 361 | { |
362 | #ifdef DEBUG | 362 | #ifdef DEBUG |
363 | qDebug("MainWindowImp: Couldn't create object, but did load library!"); | 363 | odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl; |
364 | #endif | 364 | #endif |
365 | return NULL; | 365 | return NULL; |
366 | } | 366 | } |
367 | #ifdef DEBUG | 367 | #ifdef DEBUG |
368 | qDebug("MainWindowImp::loadPlugin:: Found object, storing."); | 368 | odebug << "MainWindowImp::loadPlugin:: Found object, storing." << oendl; |
369 | #endif | 369 | #endif |
370 | // Store for deletion later | 370 | // Store for deletion later |
371 | libraries.insert(object, lib); | 371 | libraries.insert(object, lib); |
372 | return object; | 372 | return object; |
@@ -410,9 +410,9 @@ void MainWindowImp::addClicked() | |||
410 | { | 410 | { |
411 | Interface *i = (it.key())->addNewInterface(item->text(0)); | 411 | Interface *i = (it.key())->addNewInterface(item->text(0)); |
412 | if(i) | 412 | if(i) |
413 | { | 413 | { |
414 | qDebug("iface name %s",i->getInterfaceName().latin1()); | 414 | odebug << "iface name " << i->getInterfaceName().latin1() << "" << oendl; |
415 | interfaceNames.insert(i->getInterfaceName(), i); | 415 | interfaceNames.insert(i->getInterfaceName(), i); |
416 | updateInterface(i); | 416 | updateInterface(i); |
417 | } | 417 | } |
418 | } | 418 | } |
@@ -512,9 +512,9 @@ void MainWindowImp::informationClicked() | |||
512 | if(moduleInformation != NULL) | 512 | if(moduleInformation != NULL) |
513 | { | 513 | { |
514 | QPEApplication::showWidget( moduleInformation ); | 514 | QPEApplication::showWidget( moduleInformation ); |
515 | #ifdef DEBUG | 515 | #ifdef DEBUG |
516 | qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); | 516 | odebug << "MainWindowImp::informationClicked:: Module owner has created, we showed." << oendl; |
517 | #endif | 517 | #endif |
518 | return; | 518 | return; |
519 | } | 519 | } |
520 | } | 520 | } |
@@ -649,9 +649,9 @@ void MainWindowImp::removeProfile() | |||
649 | QMap<Interface*, QListViewItem*>::Iterator it; | 649 | QMap<Interface*, QListViewItem*>::Iterator it; |
650 | for( it = items.begin(); it != items.end(); ++it ) | 650 | for( it = items.begin(); it != items.end(); ++it ) |
651 | { | 651 | { |
652 | QString interfaceName = it.key()->getInterfaceName(); | 652 | QString interfaceName = it.key()->getInterfaceName(); |
653 | qDebug(interfaceName.latin1()); | 653 | odebug << interfaceName.latin1() << oendl; |
654 | if(interfaces.setInterface(interfaceName + "_" + profileToRemove)) | 654 | if(interfaces.setInterface(interfaceName + "_" + profileToRemove)) |
655 | { | 655 | { |
656 | interfaces.removeInterface(); | 656 | interfaces.removeInterface(); |
657 | if(interfaces.setMapping(interfaceName)) | 657 | if(interfaces.setMapping(interfaceName)) |
@@ -718,9 +718,9 @@ void MainWindowImp::makeChannel() | |||
718 | 718 | ||
719 | void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) | 719 | void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) |
720 | { | 720 | { |
721 | bool found = false; | 721 | bool found = false; |
722 | qDebug("MainWindowImp::receive QCop msg >"+msg+"<"); | 722 | odebug << "MainWindowImp::receive QCop msg >"+msg+"<" << oendl; |
723 | if (msg == "raise") | 723 | if (msg == "raise") |
724 | { | 724 | { |
725 | raise(); | 725 | raise(); |
726 | return; | 726 | return; |
@@ -728,14 +728,14 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) | |||
728 | 728 | ||
729 | QString dest = msg.left(msg.find("(")); | 729 | QString dest = msg.left(msg.find("(")); |
730 | QCString param = msg.right(msg.length() - msg.find("(") - 1); | 730 | QCString param = msg.right(msg.length() - msg.find("(") - 1); |
731 | param = param.left( param.length() - 1 ); | 731 | param = param.left( param.length() - 1 ); |
732 | qDebug("dest >%s< param >"+param+"<",dest.latin1()); | 732 | odebug << "dest >" << dest.latin1() << "< param >"+param+"<" << oendl; |
733 | 733 | ||
734 | QMap<Module*, QLibrary*>::Iterator it; | 734 | QMap<Module*, QLibrary*>::Iterator it; |
735 | for( it = libraries.begin(); it != libraries.end(); ++it ) | 735 | for( it = libraries.begin(); it != libraries.end(); ++it ) |
736 | { | 736 | { |
737 | qDebug("plugin >%s<", it.key()->type().latin1() ); | 737 | odebug << "plugin >" << it.key()->type().latin1() << "<" << oendl; |
738 | if(it.key()->type() == dest) | 738 | if(it.key()->type() == dest) |
739 | { | 739 | { |
740 | it.key()->receive( param, arg ); | 740 | it.key()->receive( param, arg ); |
741 | found = true; | 741 | found = true; |
@@ -743,6 +743,6 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) | |||
743 | } | 743 | } |
744 | 744 | ||
745 | 745 | ||
746 | if (found) QPEApplication::setKeepRunning(); | 746 | if (found) QPEApplication::setKeepRunning(); |
747 | else qDebug("Huh what do ya want"); | 747 | else odebug << "Huh what do ya want" << oendl; |
748 | } | 748 | } |