30 files changed, 284 insertions, 281 deletions
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp index 58e5c71..2eccdfe 100644 --- a/noncore/settings/backup/backuprestore.cpp +++ b/noncore/settings/backup/backuprestore.cpp @@ -1,10 +1,11 @@ - #include "backuprestore.h" #include "errordialog.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/ostorageinfo.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; /* QT */ #include <qapplication.h> @@ -40,7 +41,6 @@ const QString tempFileName = "/tmp/backup.err"; - BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags fl) : BackupAndRestoreBase(parent, name, fl) { @@ -73,17 +73,17 @@ BackupAndRestore::BackupAndRestore( QWidget* parent, const char* name, WFlags f if ( storage.hasCf() ) { backupLocations.insert( "CF", storage.cfPath() ); - qDebug( "Cf Path: " + storage.cfPath() ); + odebug << "Cf Path: " + storage.cfPath() << oendl; } if ( storage.hasSd() ) { backupLocations.insert( "SD", storage.sdPath() ); - qDebug( " Sd Path: " + storage.sdPath() ); + odebug << " Sd Path: " + storage.sdPath() << oendl; } if ( storage.hasMmc() ) { backupLocations.insert( "MMC", storage.mmcPath() ); - qDebug( "Mmc Path: " + storage.mmcPath() ); + odebug << "Mmc Path: " + storage.mmcPath() << oendl; } Config config("BackupAndRestore"); @@ -203,7 +203,7 @@ void BackupAndRestore::scanForApplicationSettings() QFileInfo *fi; while ( (fi=it.current()) ) { - //qDebug((d.path()+"/"+fi->fileName()).latin1()); + //odebug << (d.path()+"/"+fi->fileName()).latin1() << oendl; if ( ( fi->fileName() != "." ) && ( fi->fileName() != ".." ) ) { QListViewItem *newItem = new QListViewItem(applicationSettings, fi->fileName()); @@ -249,7 +249,7 @@ void BackupAndRestore::backup() // We execute tar and compressing its output with gzip.. // The error output will be written into a temp-file which could be provided // for debugging.. - qDebug( "Storing file: %s", outputFile.latin1() ); + odebug << "Storing file: " << outputFile.latin1() << "" << oendl; outputFile += EXTENSION; QString commandLine = QString( "cd %1 && (tar -X %1 -cz %2 Applications/backup/exclude -f %3 ) 2> %4" ).arg( QDir::homeDirPath() ) @@ -258,7 +258,7 @@ void BackupAndRestore::backup() .arg( outputFile.latin1() ) .arg( tempFileName.latin1() ); - qDebug( commandLine ); + odebug << commandLine << oendl; int r = system( commandLine ); @@ -272,7 +272,7 @@ void BackupAndRestore::backup() { case 1: - qWarning("Details pressed !"); + owarn << "Details pressed !" << oendl; ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); QFile errorFile( tempFileName ); if ( errorFile.open(IO_ReadOnly) ) @@ -359,7 +359,7 @@ void BackupAndRestore::sourceDirChanged(int selection) void BackupAndRestore::fileListUpdate() { - qWarning("void BackupAndRestore::fileListUpdate()"); + owarn << "void BackupAndRestore::fileListUpdate()" << oendl; restoreList->clear(); rescanFolder( backupLocations[restoreSource->currentText()] ); } @@ -371,7 +371,7 @@ void BackupAndRestore::fileListUpdate() */ void BackupAndRestore::rescanFolder(QString directory) { - //qDebug(QString("rescanFolder: ") + directory.latin1()); + //odebug << QString("rescanFolder: ") + directory.latin1() << oendl; QDir d(directory); if(!d.exists()) return; @@ -419,7 +419,7 @@ void BackupAndRestore::restore() restoreFile += "/" + restoreItem->text(0); - qDebug( restoreFile ); + odebug << restoreFile << oendl; //check if backup file come from opie 1.0.x @@ -442,7 +442,7 @@ void BackupAndRestore::restore() .arg( restoreFile.latin1() ) .arg( tempFileName.latin1() ); - qDebug( commandLine ); + odebug << commandLine << oendl; r = system( commandLine ); @@ -454,7 +454,7 @@ void BackupAndRestore::restore() + errorMsg, QString( tr( "Ok") ), QString( tr( "Details" ) ) ) ) { case 1: - qWarning("Details pressed !"); + owarn << "Details pressed !" << oendl; ErrorDialog* pErrDialog = new ErrorDialog( this, NULL, true ); QFile errorFile( tempFileName ); if ( errorFile.open(IO_ReadOnly) ) diff --git a/noncore/settings/netsystemtime/settingstabwidget.cpp b/noncore/settings/netsystemtime/settingstabwidget.cpp index ad80e05..1307082 100644 --- a/noncore/settings/netsystemtime/settingstabwidget.cpp +++ b/noncore/settings/netsystemtime/settingstabwidget.cpp @@ -139,7 +139,7 @@ void SettingsTabWidget::saveSettings() curSrv = 0; for ( int i = 1; i < srvCount; i++ ) { -// qDebug( "ntpSrvs[%i/%i]=%s", i, srvCount, cbTimeServer->text( i ).latin1() ); +// odebug << "ntpSrvs[" << i << "/" << srvCount << "]=" << cbTimeServer->text( i ).latin1() << "" << oendl; ntpSrvs.setGroup( QString::number( i ) ); ntpSrvs.writeEntry( "name", cbTimeServer->text( i-1 ) ); } diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index b00b899..d2b106a 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp @@ -137,13 +137,13 @@ bool Interface::refresh(){ QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name()); int ret = system(QString("LANG=C %1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1()); if(ret != 0){ - qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1()); + odebug << QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1() << oendl; return false; } QFile file(fileName); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl; return false; } @@ -201,7 +201,7 @@ bool Interface::refresh(){ file.setName(dhcpFile); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl; return false; } @@ -220,14 +220,14 @@ bool Interface::refresh(){ renewalTime = line.mid(12, line.length()).toInt(); } file.close(); - //qDebug(QString("Interface: leaseTime: %1").arg(leaseTime).latin1()); - //qDebug(QString("Interface: renewalTime: %1").arg(renewalTime).latin1()); + //odebug << QString("Interface: leaseTime: %1").arg(leaseTime).latin1() << oendl; + //odebug << QString("Interface: renewalTime: %1").arg(renewalTime).latin1() << oendl; // Get the pid of the deamond dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name())); file.setName(dhcpFile); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl; return false; } @@ -240,7 +240,7 @@ bool Interface::refresh(){ file.close(); if( pid == -1){ - qDebug("Interface: Could not get pid of dhcpc deamon."); + odebug << "Interface: Could not get pid of dhcpc deamon." << oendl; return false; } @@ -249,7 +249,7 @@ bool Interface::refresh(){ file.setName(fileName); stream.setDevice( &file ); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl; return false; } while ( !stream.eof() ) { @@ -278,12 +278,12 @@ bool Interface::refresh(){ f.close(); } else{ - qDebug("Interface: Can't open /proc/uptime to retrive uptime."); + odebug << "Interface: Can't open /proc/uptime to retrive uptime." << oendl; return false; } datetime = datetime.addSecs(time); - //qDebug(QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1()); + //odebug << QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1() << oendl; // Calculate the start and renew times leaseObtained = datetime.toString(); diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index 6b161ae..e283926 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp @@ -24,7 +24,7 @@ Interfaces::Interfaces(QString useInterfacesFile){ interfacesFile = useInterfacesFile; QFile file(interfacesFile); if (!file.open(IO_ReadOnly)){ - qDebug("Interfaces: Can't open file: %s for reading.", interfacesFile.latin1() ); + odebug << "Interfaces: Can't open file: " << interfacesFile.latin1() << " for reading." << oendl; currentIface = interfaces.end(); currentMapping = interfaces.end(); return; @@ -76,7 +76,7 @@ bool Interfaces::isAuto(const QString &interface) const { QStringList autoLines = interfaces.grep(QRegExp(AUTO)); QStringList awi = autoLines.grep(QRegExp(interface)); if(awi.count() > 1) - qDebug(QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1()); + odebug << QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1() << oendl; return awi.count() > 0; } @@ -152,7 +152,7 @@ bool Interfaces::isInterfaceSet() const { * @return true if successful. */ bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){ - qDebug("Interfaces::addInterface(%s)",interface.latin1()); + odebug << "Interfaces::addInterface(" << interface.latin1() << ")" << oendl; if(0 == acceptedFamily.contains(family)) return false; QString newInterface = interface.simplifyWhiteSpace(); @@ -168,7 +168,7 @@ bool Interfaces::addInterface(const QString &interface, const QString &family, c * @return bool true if successful */ bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){ - qDebug("copy interface %s to %s", interface.latin1(), newInterface.latin1()); + odebug << "copy interface " << interface.latin1() << " to " << newInterface.latin1() << "" << oendl; if(!setInterface(interface)) return false; @@ -275,14 +275,14 @@ QString Interfaces::getInterfaceMethod(bool &error){ * @return bool true if successful. */ bool Interfaces::setInterfaceName(const QString &newName){ - qDebug("setInterfaceName %s", newName.latin1()); + odebug << "setInterfaceName " << newName.latin1() << "" << oendl; if(currentIface == interfaces.end()) return false; QString name = newName.simplifyWhiteSpace(); name = name.replace(QRegExp(" "), ""); bool returnValue = false; QString tmp = QString("iface %1 %2 %3").arg(name).arg(getInterfaceFamily(returnValue)).arg(getInterfaceMethod(returnValue)); - qDebug("setting %s",tmp.latin1()); + odebug << "setting " << tmp.latin1() << "" << oendl; (*currentIface) = tmp; return !returnValue; @@ -345,7 +345,7 @@ bool Interfaces::setInterfaceOption(const QString &option, const QString &value) if( value.stripWhiteSpace().isEmpty() ) return removeInterfaceOption( option ); - qDebug("iface >%s< option >%s< value >%s<", (*currentIface).latin1(), option.latin1(),value.latin1()); + odebug << "iface >" << (*currentIface).latin1() << "< option >" << option.latin1() << "< value >" << value.latin1() << "<" << oendl; return setOption(currentIface, option, value); } @@ -486,7 +486,7 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString } if(valid){ if(found == true){ - qDebug(QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1()); + odebug << QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1() << oendl; } found = true; iterator = it; @@ -505,12 +505,12 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){ if(start == interfaces.end()) return false; - qDebug("setting option"); + odebug << "setting option" << oendl; bool found = false; bool replaced = false; QStringList::Iterator insertAt = NULL; for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { - qDebug(" Interfaces::setOption got line >%s<",(*it).latin1()); + odebug << " Interfaces::setOption got line >" << (*it).latin1() << "<" << oendl; // FIXME: was not completly stupid just wrong sice all options got inserted bevore the iface line // but since it works with an empty interfaces file I (tille) will not do anything more if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) ){ @@ -518,10 +518,10 @@ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &op // && it != start){ // if(!found && value != ""){ // // Got to the end of the stanza without finding it, so append it. -// qDebug(" Got to the end of the stanza without finding it, so append it."); +// odebug << " Got to the end of the stanza without finding it, so append it." << oendl; // interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value)); // } - qDebug("found 1"); + odebug << "found 1" << oendl; // interfaces.insert(++it, QString("\t%1 %2").arg(option).arg(value)); found = true; insertAt = it; @@ -529,23 +529,23 @@ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &op } if((*it).contains(option) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. - qDebug("found 2"); + odebug << "found 2" << oendl; if(found) - qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl; found = true; replaced = true; (*it) = QString("\t%1 %2").arg(option).arg(value); } } if(!found){ - qDebug("! found insert anyway"); + odebug << "! found insert anyway" << oendl; QStringList::Iterator p = start; interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); found = true; } if(found && !replaced){ - qDebug("found iface but not the option so insert it here..."); + odebug << "found iface but not the option so insert it here..." << oendl; interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value)); } return found; @@ -582,7 +582,7 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString if((*it).contains(option) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) - qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl; found = true; it = interfaces.remove( it ); // we really want to remove the line --it; // we do ++it later in the head of the for loop @@ -610,7 +610,7 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) - qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl; found = true; it = interfaces.remove( it ); // we really want to remove the line --it; // we do ++it later in the head of the for loop @@ -663,7 +663,7 @@ QString Interfaces::getOption(const QStringList::Iterator &start, const QString } if((*it).contains(option) && (*it).at(0) != '#'){ if(found) - qDebug(QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); + odebug << QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1() << oendl; found = true; QString line = (*it).simplifyWhiteSpace(); int space = line.find(" ", option.length()); @@ -687,7 +687,7 @@ bool Interfaces::write(){ QFile file(interfacesFile); if (!file.open(IO_ReadWrite)){ - qDebug(QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1()); + odebug << QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1() << oendl; return false; } QTextStream stream( &file ); @@ -700,7 +700,7 @@ bool Interfaces::write(){ else whiteSpaceCount = 0; if(whiteSpaceCount < 2){ - qDebug((*it).latin1()); + odebug << (*it).latin1() << oendl; stream << (*it) << '\n'; } } diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp index 7c2f85c..ec3bad3 100644 --- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp @@ -46,7 +46,7 @@ InterfaceSetupImp::~InterfaceSetupImp(){ bool InterfaceSetupImp::saveChanges(){ bool error; QString iface = interfaces->getInterfaceName(error); - qDebug("InterfaceSetupImp::saveChanges saves interface %s", iface.latin1() ); + odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl; if(!saveSettings()) return false; @@ -72,7 +72,7 @@ bool InterfaceSetupImp::saveChanges(){ qApp->processEvents(); if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { - qWarning("unstable to spawn ifdown/ifup"); + owarn << "unstable to spawn ifdown/ifup" << oendl; } owait->hide(); @@ -157,7 +157,7 @@ void InterfaceSetupImp::setProfile(const QString &profile){ if(!interfaces->setMapping(interface->getInterfaceName())){ interfaces->addMapping(interface->getInterfaceName()); if(!interfaces->setMapping(interface->getInterfaceName())){ - qDebug("InterfaceSetupImp: Added Mapping, but still can't setInterface."); + odebug << "InterfaceSetupImp: Added Mapping, but still can't setInterface." << oendl; return; } } @@ -167,7 +167,7 @@ void InterfaceSetupImp::setProfile(const QString &profile){ else{ interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP); if(!interfaces->setInterface(newInterfaceName)){ - qDebug("InterfaceSetupImp: Added interface, but still can't setInterface."); + odebug << "InterfaceSetupImp: Added interface, but still can't setInterface." << oendl; return; } } @@ -185,7 +185,7 @@ void InterfaceSetupImp::setProfile(const QString &profile){ // IP Information autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); - qDebug("dns >%s<",dns.latin1()); + odebug << "dns >" << dns.latin1() << "<" << oendl; if(dns.contains(" ")){ firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); @@ -199,8 +199,8 @@ void InterfaceSetupImp::setProfile(const QString &profile){ - qWarning("InterfaceSetupImp::setProfile(%s)\n", profile.latin1()); - qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1()); + owarn << "InterfaceSetupImp::setProfile(" << profile.latin1() << ")\n" << oendl; + owarn << "InterfaceSetupImp::setProfile: iface is " << interfaces->getInterfaceName(error).latin1() << "\n" << oendl; } 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 @@ -79,7 +79,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWi */ if (m_handledIfaces.contains( *ni) ) { - qDebug("Not up iface handled by module"); + odebug << "Not up iface handled by module" << oendl; continue; } bool found = false; @@ -219,7 +219,7 @@ void MainWindowImp::getAllInterfaces() int flags = 0; if ( m_handledIfaces.contains( (*it) ) ) { - qDebug(" %s is handled by a module", (*it).latin1() ); + odebug << " " << (*it).latin1() << " is handled by a module" << oendl; continue; } // int family; @@ -249,7 +249,7 @@ void MainWindowImp::getAllInterfaces() else i->setHardwareName("Unknown"); - qWarning("Adding interface %s to interfaceNames\n", ifr.ifr_name); + owarn << "Adding interface " << ifr.ifr_name << " to interfaceNames\n" << oendl; interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); connect(i, SIGNAL(updateInterface(Interface*)), @@ -265,7 +265,7 @@ void MainWindowImp::getAllInterfaces() ilist = it.key()->getInterfaces(); for( i = ilist.first(); i != 0; i = ilist.next() ) { - qWarning("Adding interface %s to interfaceNames\n", i->getInterfaceName().latin1() ); + owarn << "Adding interface " << i->getInterfaceName().latin1() << " to interfaceNames\n" << oendl; interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); connect(i, SIGNAL(updateInterface(Interface*)), @@ -283,7 +283,7 @@ void MainWindowImp::getAllInterfaces() void MainWindowImp::loadModules(const QString &path) { #ifdef DEBUG - qDebug("MainWindowImp::loadModules: %s", path.latin1()); + odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl; #endif QDir d(path); if(!d.exists()) @@ -304,7 +304,7 @@ void MainWindowImp::loadModules(const QString &path) { #endif loadPlugin(path + "/" + fi->fileName()); - qDebug("loaded plugin: >%s< ",QString(path + "/" + fi->fileName()).latin1()); + odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl; } ++it; } @@ -319,7 +319,7 @@ void MainWindowImp::loadModules(const QString &path) Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString) { #ifdef DEBUG - qDebug("MainWindowImp::loadPlugin: %s: resolving %s", pluginFileName.latin1(), resolveString.latin1()); + odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl; #endif #ifdef QWS QLibrary *lib = new QLibrary(pluginFileName); @@ -327,7 +327,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & if( !functionPointer ) { #ifdef DEBUG - qDebug("MainWindowImp::loadPlugin: Warning: %s is not a plugin", pluginFileName.latin1()); + odebug << "MainWindowImp::loadPlugin: Warning: " << pluginFileName.latin1() << " is not a plugin" << oendl; #endif delete lib; return NULL; @@ -337,7 +337,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & if(object == NULL) { #ifdef DEBUG - qDebug("MainWindowImp: Couldn't create object, but did load library!"); + odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl; #endif delete lib; return NULL; @@ -352,7 +352,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & QLibrary *lib = loader->library(pluginFileName); if( !lib || !lib->hasSymbol(resolveString) ) { - qDebug(QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); + odebug << QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1() << oendl; return NULL; } // Try to get an object. @@ -360,12 +360,12 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString & if(object == NULL) { #ifdef DEBUG - qDebug("MainWindowImp: Couldn't create object, but did load library!"); + odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl; #endif return NULL; } #ifdef DEBUG - qDebug("MainWindowImp::loadPlugin:: Found object, storing."); + odebug << "MainWindowImp::loadPlugin:: Found object, storing." << oendl; #endif // Store for deletion later libraries.insert(object, lib); @@ -411,7 +411,7 @@ void MainWindowImp::addClicked() Interface *i = (it.key())->addNewInterface(item->text(0)); if(i) { - qDebug("iface name %s",i->getInterfaceName().latin1()); + odebug << "iface name " << i->getInterfaceName().latin1() << "" << oendl; interfaceNames.insert(i->getInterfaceName(), i); updateInterface(i); } @@ -513,7 +513,7 @@ void MainWindowImp::informationClicked() { QPEApplication::showWidget( moduleInformation ); #ifdef DEBUG - qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); + odebug << "MainWindowImp::informationClicked:: Module owner has created, we showed." << oendl; #endif return; } @@ -650,7 +650,7 @@ void MainWindowImp::removeProfile() for( it = items.begin(); it != items.end(); ++it ) { QString interfaceName = it.key()->getInterfaceName(); - qDebug(interfaceName.latin1()); + odebug << interfaceName.latin1() << oendl; if(interfaces.setInterface(interfaceName + "_" + profileToRemove)) { interfaces.removeInterface(); @@ -719,7 +719,7 @@ void MainWindowImp::makeChannel() void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) { bool found = false; - qDebug("MainWindowImp::receive QCop msg >"+msg+"<"); + odebug << "MainWindowImp::receive QCop msg >"+msg+"<" << oendl; if (msg == "raise") { raise(); @@ -729,12 +729,12 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) QString dest = msg.left(msg.find("(")); QCString param = msg.right(msg.length() - msg.find("(") - 1); param = param.left( param.length() - 1 ); - qDebug("dest >%s< param >"+param+"<",dest.latin1()); + odebug << "dest >" << dest.latin1() << "< param >"+param+"<" << oendl; QMap<Module*, QLibrary*>::Iterator it; for( it = libraries.begin(); it != libraries.end(); ++it ) { - qDebug("plugin >%s<", it.key()->type().latin1() ); + odebug << "plugin >" << it.key()->type().latin1() << "<" << oendl; if(it.key()->type() == dest) { it.key()->receive( param, arg ); @@ -744,5 +744,5 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) if (found) QPEApplication::setKeepRunning(); - else qDebug("Huh what do ya want"); + else odebug << "Huh what do ya want" << oendl; } diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp index b8a1925a..aedc0b9 100644 --- a/noncore/settings/networksettings/ppp/accounts.cpp +++ b/noncore/settings/networksettings/ppp/accounts.cpp @@ -118,7 +118,7 @@ void AccountWidget::create() int result; if (_pppdata->newaccount() == -1) { - qDebug("_pppdata->newaccount() == -1"); + odebug << "_pppdata->newaccount() == -1" << oendl; return; } result = doTab(); diff --git a/noncore/settings/networksettings/ppp/authwidget.cpp b/noncore/settings/networksettings/ppp/authwidget.cpp index fa2b164..f3d842f 100644 --- a/noncore/settings/networksettings/ppp/authwidget.cpp +++ b/noncore/settings/networksettings/ppp/authwidget.cpp @@ -142,7 +142,7 @@ void AuthWidget::save() void AuthWidget::authChanged( const QString &authStr ) { - qDebug("AuthWidget::authChanged( %s )", authStr.latin1() ); + odebug << "AuthWidget::authChanged( " << authStr.latin1() << " )" << oendl; if ( authStr.contains( tr("Script-based") ) ){ showUsernamePassword( false ); showScriptWindow( true ); @@ -151,7 +151,7 @@ void AuthWidget::authChanged( const QString &authStr ) showUsernamePassword( true ); showScriptWindow( false ); } else { - qDebug("do not really know how to handle"); + odebug << "do not really know how to handle" << oendl; showUsernamePassword( false ); showScriptWindow( false ); } diff --git a/noncore/settings/networksettings/ppp/connect.cpp b/noncore/settings/networksettings/ppp/connect.cpp index e3fab24..b75410c 100644 --- a/noncore/settings/networksettings/ppp/connect.cpp +++ b/noncore/settings/networksettings/ppp/connect.cpp @@ -472,7 +472,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { scriptCommand = *(comlist->at(scriptindex)); scriptArgument = *(arglist->at(scriptindex)); } else { - qDebug( "End of script" ); + odebug << "End of script" << oendl; vmain = 10; return; } @@ -838,7 +838,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { killTimer( main_timer_ID ); if_timeout_timer->start(_ifaceppp->data()->pppdTimeout()*1000); - qDebug( "started if timeout timer with %i", _ifaceppp->data()->pppdTimeout()*1000); + odebug << "started if timeout timer with " << _ifaceppp->data()->pppdTimeout()*1000 << "" << oendl; // find out PPP interface and notify the stats module // stats->setUnit(pppInterfaceNumber()); @@ -848,7 +848,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { result = execppp(); emit debugMessage(QObject::tr("Starting pppd...")); - qDebug("execppp() returned with return-code %i", result ); + odebug << "execppp() returned with return-code " << result << "" << oendl; if(result) { if(!_ifaceppp->data()->autoDNS()) @@ -1064,7 +1064,7 @@ void ConnectWidget::setExpect(const QString &n) { void ConnectWidget::if_waiting_timed_out() { if_timer->stop(); if_timeout_timer->stop(); - qDebug("if_waiting_timed_out()"); + odebug << "if_waiting_timed_out()" << oendl; _ifaceppp->data()->setpppdError(E_IF_TIMEOUT); @@ -1271,7 +1271,7 @@ bool ConnectWidget::execppp() { return false; // nonsensically long command which would bust my buffer buf. } - qWarning("Command IS: %s",command.latin1() ); + owarn << "Command IS: " << command.latin1() << "" << oendl; qApp->flushX(); diff --git a/noncore/settings/networksettings/ppp/devices.cpp b/noncore/settings/networksettings/ppp/devices.cpp index 9da090d..350ff32 100644 --- a/noncore/settings/networksettings/ppp/devices.cpp +++ b/noncore/settings/networksettings/ppp/devices.cpp @@ -72,11 +72,11 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam // delete_b->setEnabled( false ); //FIXME QStringList tmp = _pppdata->getDevicesNamesList(); - qDebug("DevicesWidget::DevicesWidget got devices %s",tmp.join("--").latin1()); + odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl; listListbox->insertStringList(tmp); for (uint i = 0; i < listListbox->count(); i++){ - qDebug("listListbox->text(i) %s == _pppdata->devname() %s",listListbox->text(i).latin1(), _pppdata->devname().latin1()); + odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl; if ( listListbox->text(i) == _pppdata->devname() ) listListbox->setCurrentItem( i ); } diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp index 81dab38..69bb682 100644 --- a/noncore/settings/networksettings/ppp/general.cpp +++ b/noncore/settings/networksettings/ppp/general.cpp @@ -335,7 +335,7 @@ bool ModemWidget::save() !_pppdata->isUniqueDevname(modemname->text())) return false; - qDebug("ModemWidget::save saving modem1 data"); + odebug << "ModemWidget::save saving modem1 data" << oendl; _pppdata->setDevname( modemname->text() ); _pppdata->setModemDevice( modemdevice->currentText() ); _pppdata->setFlowcontrol(flowcontrol->currentText()); diff --git a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp index 6b158b9..5a76293 100644 --- a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp +++ b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp @@ -20,7 +20,7 @@ InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f) :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp) { - qDebug("InterfaceInformationPPP::InterfaceInformationPPP %s", name); + odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl; con = new ConnectWidget( (InterfacePPP*)i, this, "con" ); con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed) ); diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp index f443f3c..5cc6f70 100644 --- a/noncore/settings/networksettings/ppp/interfaceppp.cpp +++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp @@ -14,13 +14,13 @@ InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status) _modemPtr(0), _dataPtr(0) { - qDebug("InterfacePPP::InterfacePPP("); + odebug << "InterfacePPP::InterfacePPP(" << oendl; } PPPData* InterfacePPP::data()const { if (!_dataPtr){ - qDebug("creating new Data obj"); + odebug << "creating new Data obj" << oendl; _dataPtr = new PPPData(); _dataPtr->setDevice( getInterfaceName() ); _dataPtr->setAccount( getHardwareName() ); @@ -31,7 +31,7 @@ PPPData* InterfacePPP::data()const Modem* InterfacePPP::modem()const { if (!_modemPtr){ - qDebug("creating new modem obj"); + odebug << "creating new modem obj" << oendl; _modemPtr = new Modem( data() ); } return _modemPtr; @@ -39,7 +39,7 @@ Modem* InterfacePPP::modem()const bool InterfacePPP::refresh() { - qDebug("InterfacePPP::refresh()"); + odebug << "InterfacePPP::refresh()" << oendl; QString old = getInterfaceName(); setInterfaceName( modem()->pppDevice() ); @@ -53,7 +53,7 @@ bool InterfacePPP::refresh() void InterfacePPP::start() { - qDebug("InterfacePPP::start"); + odebug << "InterfacePPP::start" << oendl; if (data()->password().isEmpty() && !data()->storedUsername().isEmpty() ) { @@ -143,12 +143,12 @@ void InterfacePPP::start() emit begin_connect(); - qDebug("InterfacePPP::start END"); + odebug << "InterfacePPP::start END" << oendl; } void InterfacePPP::stop() { - qDebug("InterfacePPP::stop"); + odebug << "InterfacePPP::stop" << oendl; // emit hangup_now(); status = false; // not connected setStatus( false ); diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp index e21bbc7..fd09332 100644 --- a/noncore/settings/networksettings/ppp/kpppwidget.cpp +++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp @@ -74,13 +74,13 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na // before doing anything else, run a few tests if (!_pppdata->setModemDevice( i->getInterfaceName() )) _pppdata->setModemDevice("/dev/modem"); - qDebug("PPPConfigWidget::PPPConfigWidget"); - qDebug(" interface->getHardwareName >%s<", i->getHardwareName().latin1()); + odebug << "PPPConfigWidget::PPPConfigWidget" << oendl; + odebug << " interface->getHardwareName >" << i->getHardwareName().latin1() << "<" << oendl; if (!_pppdata->setAccount( i->getHardwareName() )) _pppdata->setAccount( 0 ); - qDebug(" _pppdata->accname >%s<",_pppdata->accname().latin1()); - qDebug(" _pppdata->currentAccountID() >%i<",_pppdata->currentAccountID()); + odebug << " _pppdata->accname >" << _pppdata->accname().latin1() << "<" << oendl; + odebug << " _pppdata->currentAccountID() >" << _pppdata->currentAccountID() << "<" << oendl; int result = runTests(); if(result == TEST_CRITICAL) @@ -305,7 +305,7 @@ KPPPWidget::~KPPPWidget() // if(e->type() == QEvent::User) { // switch(((SignalEvent*)e)->sigType()) { // case SIGINT: -// qDebug( "Received a SIGINT" ); +// odebug << "Received a SIGINT" << oendl; // interruptConnection(); // break; // case SIGCHLD: @@ -423,13 +423,13 @@ void KPPPWidget::interruptConnection() { void KPPPWidget::sigPPPDDied() { - qDebug( "Received a SIGUSR1" ); + odebug << "Received a SIGUSR1" << oendl; // if we are not connected pppdpid is -1 so have have to check for that // in the followin line to make sure that we don't raise a false alarm // such as would be the case when the log file viewer exits. if(_pppdata->pppdRunning() || _pppdata->pppdError()) { - qDebug( "It was pppd that died" ); + odebug << "It was pppd that died" << oendl; // when we killpppd() on Cancel in ConnectWidget // we set pppid to -1 so we won't @@ -442,7 +442,7 @@ void KPPPWidget::sigPPPDDied() { _pppdata->setpppdRunning(false); - qDebug( "Executing command on disconnect since pppd has died." ); + odebug << "Executing command on disconnect since pppd has died." << oendl; QApplication::flushX(); execute_command(_pppdata->command_on_disconnect()); @@ -489,7 +489,7 @@ void KPPPWidget::sigPPPDDied() { // // PPPL_ShowLog(); // } else { /* reconnect on disconnect */ if (false){ - qDebug( "Trying to reconnect... " ); + odebug << "Trying to reconnect... " << oendl; if(_pppdata->authMethod() == AUTH_PAP || _pppdata->authMethod() == AUTH_CHAP || @@ -511,7 +511,7 @@ void KPPPWidget::sigPPPDDied() { } // void KPPPWidget::sigChld() { -// qDebug( "sigchld()" ); +// odebug << "sigchld()" << oendl; // // pid_t id = wait(0L); // // if(id == helperPid && helperPid != -1) { // // kdDebug(5002) << "It was the setuid child that died" << endl; diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 3dbc8c3..f3f2639 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp @@ -55,7 +55,7 @@ #define MY_ASSERT(x) if (!(x)) { \ - qFatal( "ASSERT: \"%s\" in %s (%d)\n",#x,__FILE__,__LINE__); \ + ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \ exit(1); } @@ -165,7 +165,7 @@ bool Modem::opentty() { close(modemfd); device = _pppdata->modemDevice(); if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) { - qDebug("error opening modem device !"); + odebug << "error opening modem device !" << oendl; errmsg = QObject::tr("Unable to open modem."); return false; } @@ -306,9 +306,9 @@ void Modem::startNotifier() { if(sn == 0) { sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this); connect(sn, SIGNAL(activated(int)), SLOT(readtty(int))); - qDebug("QSocketNotifier started!"); + odebug << "QSocketNotifier started!" << oendl; } else { - qDebug("QSocketNotifier re-enabled!"); + odebug << "QSocketNotifier re-enabled!" << oendl; sn->setEnabled(true); } } @@ -321,7 +321,7 @@ void Modem::stopNotifier() { disconnect(sn); delete sn; sn = 0; - qDebug( "QSocketNotifier stopped!" ); + odebug << "QSocketNotifier stopped!" << oendl; } } @@ -337,7 +337,7 @@ bool Modem::writeChar(unsigned char c) { do { s = write(modemfd, &c, 1); if (s < 0) { - qError( "write() in Modem::writeChar failed" ); + oerr << "write() in Modem::writeChar failed" << oendl; return false; } } while(s == 0); @@ -365,7 +365,7 @@ bool Modem::writeLine(const char *buf) { int wr = write(modemfd, &b[len-l], l); if(wr < 0) { // TODO do something meaningful with the error code (or ignore it - qError( "write() in Modem::writeLine failed" ); + oerr << "write() in Modem::writeLine failed" << oendl; delete[] b; return false; } @@ -474,7 +474,7 @@ QString Modem::parseModemSpeed(const QString &s) { int i; QString result; - qDebug( "Modem reported result string: %s", s.latin1()); + odebug << "Modem reported result string: " << s.latin1() << "" << oendl; const int RXMAX = 7; const int TXMAX = 2; @@ -560,7 +560,7 @@ QString Modem::parseModemSpeed(const QString &s) { else result.sprintf("%d/%d", rx, tx); - qDebug( "The parsed result is: %s", result.latin1()); + odebug << "The parsed result is: " << result.latin1() << "" << oendl; return result; } @@ -573,7 +573,7 @@ int Modem::lockdevice() { char newlock[80]=""; // safe if(!_pppdata->modemLockFile()) { - qDebug("The user doesn't want a lockfile."); + odebug << "The user doesn't want a lockfile." << oendl; return 0; } @@ -595,7 +595,7 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { return 1; oldlock[sz] = '\0'; - qDebug( "Device is locked by: %s", oldlock); + odebug << "Device is locked by: " << oldlock << "" << oendl; int oldpid; int match = sscanf(oldlock, "%d", &oldpid); @@ -608,14 +608,14 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { if (kill((pid_t)oldpid, 0) == 0 || errno != ESRCH) return 1; - qDebug( "lockfile is stale" ); + odebug << "lockfile is stale" << oendl; } } fd = openLockfile(_pppdata->modemDevice(),O_WRONLY|O_TRUNC|O_CREAT); if(fd >= 0) { sprintf(newlock,"%010d\n", getpid()); - qDebug("Locking Device: %s", newlock); + odebug << "Locking Device: " << newlock << "" << oendl; write(fd, newlock, strlen(newlock)); close(fd); @@ -632,7 +632,7 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { // UnLock modem device void Modem::unlockdevice() { if (modem_is_locked) { - qDebug( "UnLocking Modem Device" ); + odebug << "UnLocking Modem Device" << oendl; close(modemfd); modemfd = -1; unlink(lockfile); @@ -654,7 +654,7 @@ int Modem::openLockfile( QString lockfile, int flags) lockfile = LOCK_DIR; lockfile += "/LCK.."; lockfile += device.right( device.length() - device.findRev("/") -1 ); - qDebug("lockfile >%s<",lockfile.latin1()); + odebug << "lockfile >" << lockfile.latin1() << "<" << oendl; // TODO: // struct stat st; // if(stat(lockfile.data(), &st) == -1) { @@ -666,7 +666,7 @@ int Modem::openLockfile( QString lockfile, int flags) // return -1; // } if ((fd = open(lockfile, flags, mode)) == -1) { - qDebug("error opening lockfile!"); + odebug << "error opening lockfile!" << oendl; lockfile = QString::null; fd = open(DEVNULL, O_RDONLY); } else @@ -927,7 +927,7 @@ bool Modem::execpppd(const char *arguments) { break; default: - qDebug("In parent: pppd pid %d\n",pppdPid); + odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl; close(modemfd); ::close( m_pppdLOG[1] ); @@ -935,7 +935,7 @@ bool Modem::execpppd(const char *arguments) { int flag = ::fcntl( m_pppdLOG[0], F_GETFL ); if ( !(flag & O_NONBLOCK) ) { - qDebug("Setting nonblocking io"); + odebug << "Setting nonblocking io" << oendl; flag |= O_NONBLOCK; ::fcntl(m_pppdLOG[0], F_SETFL, flag ); } @@ -954,15 +954,15 @@ bool Modem::execpppd(const char *arguments) { bool Modem::killpppd() { - qDebug("In killpppd and pid is %d", pppdPid ); + odebug << "In killpppd and pid is " << pppdPid << "" << oendl; if(pppdPid > 0) { delete m_modemDebug; m_modemDebug = 0; - qDebug("In killpppd(): Sending SIGTERM to %d\n", pppdPid); + odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl; if(kill(pppdPid, SIGTERM) < 0) { - qDebug("Error terminating %d. Sending SIGKILL\n", pppdPid); + odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl; if(kill(pppdPid, SIGKILL) < 0) { - qDebug("Error killing %d\n", pppdPid); + odebug << "Error killing " << pppdPid << "\n" << oendl; return false; } } @@ -1035,7 +1035,7 @@ int Modem::openResolv(int flags) { int fd; if ((fd = open(_PATH_RESCONF, flags)) == -1) { - qDebug("error opening resolv.conf!"); + odebug << "error opening resolv.conf!" << oendl; fd = open(DEVNULL, O_RDONLY); } return fd; @@ -1056,7 +1056,7 @@ pid_t Modem::pppPID()const { return pppdPid; } void Modem::setPPPDPid( pid_t pid ) { - qDebug("Modem setting pid"); + odebug << "Modem setting pid" << oendl; _pppdExitStatus = -1; pppdPid = pid; modemfd = -1; diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp index 97baf31..a8c99fd 100644 --- a/noncore/settings/networksettings/ppp/pppconfig.cpp +++ b/noncore/settings/networksettings/ppp/pppconfig.cpp @@ -25,10 +25,10 @@ PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent, } interface = iface; - qDebug("PPPConfigWidget::PPPConfigWidget"); - qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); + odebug << "PPPConfigWidget::PPPConfigWidget" << oendl; + odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl; - qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); + odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl; QVBoxLayout *layout = new QVBoxLayout( this ); @@ -58,9 +58,9 @@ PPPConfigWidget::~PPPConfigWidget() void PPPConfigWidget::accept() { - qDebug("PPPConfigWidget::accept"); - qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); - qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); + odebug << "PPPConfigWidget::accept" << oendl; + odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl; + odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl; interface->setInterfaceName( interface->data()->devname() ); interface->setHardwareName( interface->data()->accname() ); interface->save(); diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp index f4727c1..567ccf8 100644 --- a/noncore/settings/networksettings/ppp/pppdata.cpp +++ b/noncore/settings/networksettings/ppp/pppdata.cpp @@ -56,8 +56,8 @@ PPPData::PPPData() cfg.setGroup(GENERAL_GRP); accountList = cfg.readListEntry(ACCOUNT_LIST, ',' ); deviceList = cfg.readListEntry(DEVICESNAMES_LIST, ',' ); - qDebug("PPPData::PPPData has a accountList %s", accountList.join("---").latin1()); - qDebug("PPPData::PPPData has a deviceList %s", deviceList.join("---").latin1()); + odebug << "PPPData::PPPData has a accountList " << accountList.join("---").latin1() << "" << oendl; + odebug << "PPPData::PPPData has a deviceList " << deviceList.join("---").latin1() << "" << oendl; // if (highcount > MAX_ACCOUNTS) // highcount = MAX_ACCOUNTS; @@ -86,7 +86,7 @@ Config PPPData::config() // void PPPData::save() { - qDebug("PPPData saving data"); + odebug << "PPPData saving data" << oendl; writeConfig(GENERAL_GRP, NUMACCOUNTS_KEY, count()); writeConfig(GENERAL_GRP, NUMDEVICES_KEY, highcountdev + 1); QString key; @@ -100,9 +100,9 @@ void PPPData::save() it != stringEntries.end(); ++it ){ QString val = it.data(); key = it.key(); -// qDebug("saving %s -> %s", key.latin1(), val.latin1() ); +// odebug << "saving " << key.latin1() << " -> " << val.latin1() << "" << oendl; keys = QStringList::split( "SEPARATOR", key ); - //qDebug("group >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); + //odebug << "group >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl; cfg.setGroup(keys[0]); cfg.writeEntry(keys[1], val); } @@ -110,9 +110,9 @@ void PPPData::save() it != intEntries.end(); ++it ){ int val = it.data(); key = it.key(); -// qDebug("saving %s -> %i", key.latin1(), val ); +// odebug << "saving " << key.latin1() << " -> " << val << "" << oendl; keys = QStringList::split( "SEPARATOR", key ); - //qDebug("group >%s< key >%s< val %i", keys[0].latin1(), keys[1].latin1(), val ); + //odebug << "group >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< val " << val << "" << oendl; cfg.setGroup(keys[0]); cfg.writeEntry(keys[1], val); } @@ -121,7 +121,7 @@ void PPPData::save() QStringList val = it.data(); key = it.key(); QChar sep = sepEntries[key]; -// qDebug("saving %s -> %s", key.latin1(), val.join(sep).latin1() ); +// odebug << "saving " << key.latin1() << " -> " << val.join(sep).latin1() << "" << oendl; keys = QStringList::split( "SEPARATOR", key ); cfg.setGroup(keys[0]); cfg.writeEntry(keys[1], val, sep); @@ -142,7 +142,7 @@ void PPPData::cancel() { QString PPPData::readConfig(const QString &group, const QString &key, const QString &defvalue = "") { -// qDebug("PPPData::readConfig key >%s< group >%s<",key.latin1(), group.latin1()); +// odebug << "PPPData::readConfig key >" << key.latin1() << "< group >" << group.latin1() << "<" << oendl; QString idx = SEP.arg(group).arg(key); if (stringEntries.find(idx) != stringEntries.end()) return stringEntries[idx]; @@ -365,21 +365,21 @@ const QString PPPData::modemDevice() { // } // bool PPPData::setModemName(const QString &n) { -// qDebug("Setting modem name to >%s<", n.latin1()); +// odebug << "Setting modem name to >" << n.latin1() << "<" << oendl; // _modemName = n; // writeConfig(cgroup, MODEMNAME_KEY, n); // return true; //FIXME // } // bool PPPData::changeModemName(const QString &n) { -// qDebug("Setting modem name to >%s<", n.latin1()); +// odebug << "Setting modem name to >" << n.latin1() << "<" << oendl; // _modemName = n; // writeConfig(modemGroup(), MODEMNAME_KEY, n); // return true; //FIXME // } bool PPPData::setModemDevice(const QString &n) { - qDebug("Setting modem dev to >%s<", n.latin1()); + odebug << "Setting modem dev to >" << n.latin1() << "<" << oendl; writeConfig(modemGroup(), MODEMDEV_KEY, n); return true; //FIXME } @@ -739,18 +739,18 @@ int PPPData::count() const { bool PPPData::setAccount(const QString &aname) { - qDebug("setting account to >%s<", aname.latin1()); + odebug << "setting account to >" << aname.latin1() << "<" << oendl; for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) { cgroup = *it; - qDebug("PPPData::setAccount %s", cgroup.latin1()); - qDebug( "iterator %s", (*it).latin1() ); + odebug << "PPPData::setAccount " << cgroup.latin1() << "" << oendl; + odebug << "iterator " << (*it).latin1() << "" << oendl; if(accname() == aname) { - qDebug("SUCCESS"); + odebug << "SUCCESS" << oendl; return true; } } - qDebug("FAILURE"); + odebug << "FAILURE" << oendl; return false; } @@ -772,11 +772,11 @@ bool PPPData::isUniqueAccname(const QString &n) { QString save_cgroup = cgroup; for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) { cgroup = *it; - qDebug("PPPData::setAccount %s", cgroup.latin1()); - qDebug( "%s \n", (*it).latin1() ); + odebug << "PPPData::setAccount " << cgroup.latin1() << "" << oendl; + odebug << "" << (*it).latin1() << " \n" << oendl; if(accname() == n && cgroup != save_cgroup) { cgroup = save_cgroup; - qDebug("SUCCESS"); + odebug << "SUCCESS" << oendl; return false; } @@ -788,13 +788,13 @@ bool PPPData::isUniqueAccname(const QString &n) { bool PPPData::isUniqueDevname(const QString &n) { QString save_mName = _modemName; - qDebug("PPPData::isUniqueDevname checking if %s is unique", n.latin1()); + odebug << "PPPData::isUniqueDevname checking if " << n.latin1() << " is unique" << oendl; for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { _modemName = *it; - qDebug("PPPData::isUniqueDevname %s == %s", n.latin1() , devname().latin1()); + odebug << "PPPData::isUniqueDevname " << n.latin1() << " == " << devname().latin1() << "" << oendl; if(devname() == n && _modemName != save_mName) { _modemName = save_mName; - qDebug("NOT UNIQUE"); + odebug << "NOT UNIQUE" << oendl; return false; } @@ -820,7 +820,7 @@ bool PPPData::deleteAccount() { keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==cgroup){ stringEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl; } } for( QMap<QString,int>::Iterator it = intEntries.begin(); @@ -830,7 +830,7 @@ bool PPPData::deleteAccount() { keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==cgroup){ intEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%i<", keys[0].latin1(), keys[1].latin1(), val ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val << "<" << oendl; } } for( QMap<QString,QStringList>::Iterator it = listEntries.begin(); @@ -840,7 +840,7 @@ bool PPPData::deleteAccount() { if(keys[0]==cgroup){ listEntries.remove( it ); sepEntries.remove( key ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.join("").latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.join("").latin1() << "<" << oendl; } } @@ -860,7 +860,7 @@ bool PPPData::deleteAccount(const QString &aname) { int PPPData::newaccount() { - qDebug("PPPData::newaccount highcount %i/%i",highcount,MAX_ACCOUNTS); + odebug << "PPPData::newaccount highcount " << highcount << "/" << MAX_ACCOUNTS << "" << oendl; // if(!config) open(); // if (highcount >= MAX_ACCOUNTS) return -1; @@ -869,7 +869,7 @@ int PPPData::newaccount() { tmp.sprintf("%s%i", ACCOUNT_GRP, ++highcount); cgroup = QString(tmp); accountList << tmp; - qDebug("PPPData::newaccount() Group: >%s<",cgroup.latin1()); + odebug << "PPPData::newaccount() Group: >" << cgroup.latin1() << "<" << oendl; setpppdArgumentDefaults(); return highcount; } @@ -965,9 +965,9 @@ void PPPData::setStoredUsername(const QString &b) { const QString PPPData::storedPassword() { - qDebug("getting stored pw"); - qDebug("g %s", cgroup.latin1() ); - qDebug("k %s", STORED_PASSWORD_KEY); + odebug << "getting stored pw" << oendl; + odebug << "g " << cgroup.latin1() << "" << oendl; + odebug << "k " << STORED_PASSWORD_KEY << "" << oendl; return readConfig(cgroup, STORED_PASSWORD_KEY, ""); } @@ -1329,10 +1329,10 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces ) cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i++)); cfg.writeEntry( ACOUNTS_DEV, it.key() ); cfg.writeEntry( ACOUNTS_ACC, it.data() ); - qDebug("I %i",i); + odebug << "I " << i << "" << oendl; } cfg.setGroup( ACCLIST_GRP ); - qDebug("saved %i account settings", i); + odebug << "saved " << i << " account settings" << oendl; cfg.writeEntry( ACCOUNTS_COUNT, i ); } @@ -1372,7 +1372,7 @@ QStringList PPPData::getAccountList() const QString PPPData::devname() { QString tmp = readConfig(modemGroup(), MODEMNAME_KEY ); - qDebug("PPPData::devname() of %s is %s", modemGroup().latin1(), tmp.latin1()); + odebug << "PPPData::devname() of " << modemGroup().latin1() << " is " << tmp.latin1() << "" << oendl; return tmp; } @@ -1390,20 +1390,20 @@ void PPPData::setDevname(const QString &n) { bool PPPData::setDevice(const QString &dev ) { - qDebug("setting device to >%s<", dev.latin1()); + odebug << "setting device to >" << dev.latin1() << "<" << oendl; QString save_mName = _modemName; for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { _modemName = *it; - qDebug("PPPData::setDevice %s is named %s", _modemName.latin1(), devname().latin1() ); - qDebug( "iterator %s", (*it).latin1() ); + odebug << "PPPData::setDevice " << _modemName.latin1() << " is named " << devname().latin1() << "" << oendl; + odebug << "iterator " << (*it).latin1() << "" << oendl; if(devname() == dev) { - qDebug("SUCCESS"); + odebug << "SUCCESS" << oendl; return true; } } _modemName = save_mName; - qDebug("FAILURE"); + odebug << "FAILURE" << oendl; return false; } @@ -1424,7 +1424,7 @@ bool PPPData::deleteDevice() keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==modemGroup()){ stringEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl; } } for( QMap<QString,int>::Iterator it = intEntries.begin(); @@ -1434,7 +1434,7 @@ bool PPPData::deleteDevice() keys = QStringList::split( "SEPARATOR", key ); if(keys[0]==modemGroup()){ intEntries.remove( it ); - qDebug("deleting >%s< key >%s< value >%i<", keys[0].latin1(), keys[1].latin1(), val ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val << "<" << oendl; } } for( QMap<QString,QStringList>::Iterator it = listEntries.begin(); @@ -1444,7 +1444,7 @@ bool PPPData::deleteDevice() if(keys[0]==modemGroup()){ listEntries.remove( it ); sepEntries.remove( key ); - qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.join("").latin1() ); + odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.join("").latin1() << "<" << oendl; } } @@ -1463,14 +1463,14 @@ bool PPPData::deleteDevice(const QString &dev) int PPPData::newdevice() { - qDebug("PPPData::newdevice highcount %i",highcountdev); + odebug << "PPPData::newdevice highcount " << highcountdev << "" << oendl; QString tmp; tmp.sprintf("%s%i", MODEM_GRP, ++highcountdev); _modemName = QString(tmp); deviceList << tmp; - qDebug("PPPData::newdevice() Group: >%s<",cgroup.latin1()); + odebug << "PPPData::newdevice() Group: >" << cgroup.latin1() << "<" << oendl; return highcountdev; } @@ -1484,10 +1484,10 @@ QStringList PPPData::getDevicesNamesList() { QStringList list; QString save_mName = _modemName; - qDebug("PPPData::getDevicesNamesList has %s", deviceList.join("---").latin1()); + odebug << "PPPData::getDevicesNamesList has " << deviceList.join("---").latin1() << "" << oendl; for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { _modemName = *it; - qDebug("PPPData::getDevicesNamesList adding %s as %s",_modemName.latin1(), devname().latin1()); + odebug << "PPPData::getDevicesNamesList adding " << _modemName.latin1() << " as " << devname().latin1() << "" << oendl; list << devname(); } _modemName = save_mName; diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index a7caffe..2291e8a 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp @@ -60,10 +60,10 @@ PPPModule::PPPModule() : Module() QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces(); QMap<QString,QString>::Iterator it; InterfacePPP *iface; - qDebug("getting interfaces"); + odebug << "getting interfaces" << oendl; for( it = ifaces.begin(); it != ifaces.end(); ++it ) { - qDebug("ifaces %s %s", it.key().latin1(), it.data().latin1() ); + odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl; iface = new InterfacePPP( 0, it.key() ); iface->setHardwareName( it.data() ); list.append( (Interface*)iface ); @@ -71,7 +71,7 @@ PPPModule::PPPModule() : Module() // check if (*it) is one of the running ifaces if ( running.contains( it.data() ) ) { - qDebug("iface is running %s", it.key().latin1() ); + odebug << "iface is running " << it.key().latin1() << "" << oendl; handledInterfaceNames << running[it.data()].device; iface->setStatus( true ); iface->setPPPDpid( running[it.data()].pid ); @@ -88,7 +88,7 @@ PPPModule::PPPModule() : Module() */ PPPModule::~PPPModule() { - qDebug("PPPModule::~PPPModule() " ); + odebug << "PPPModule::~PPPModule() " << oendl; QMap<QString,QString> ifaces; InterfaceKeeper keeper; Interface *i; @@ -97,7 +97,7 @@ PPPModule::~PPPModule() /* if online save the state */ if ( i->getStatus() ) { - qDebug("Iface %s is still up", i->getHardwareName().latin1() ); + odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl; InterfacePPP* ppp = static_cast<InterfacePPP*>(i); keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() ); } @@ -141,7 +141,7 @@ bool PPPModule::isOwner(Interface *i) */ QWidget *PPPModule::configure(Interface *i) { - qDebug("return ModemWidget"); + odebug << "return ModemWidget" << oendl; PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, 0, "PPPConfig", false, (Qt::WDestructiveClose | Qt::WStyle_ContextHelp)); @@ -168,7 +168,7 @@ QWidget *PPPModule::information(Interface *i) QList<Interface> PPPModule::getInterfaces() { // List all of the files in the peer directory - qDebug("PPPModule::getInterfaces"); + odebug << "PPPModule::getInterfaces" << oendl; return list; } @@ -261,7 +261,7 @@ namespace con.name = (*it); con.pid = cfg.readNumEntry("pid"); con.device = cfg.readEntry("device"); - qDebug(" %s %s %d", con.name.latin1(), con.device.latin1(), con.pid ); + odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl; if ( con.pid != -1 && isAvailable( con.pid ) ) ifaces.insert( con.name, con ); @@ -272,11 +272,11 @@ namespace { if (::kill(p, 0 ) == 0 || errno != ESRCH ) { - qDebug("isAvailable %d", p); + odebug << "isAvailable " << p << "" << oendl; return true; } - qDebug("notAvailable %d", p); + odebug << "notAvailable " << p << "" << oendl; return false; } diff --git a/noncore/settings/networksettings/wlan/infoimp.cpp b/noncore/settings/networksettings/wlan/infoimp.cpp index bd56678..c558f5e 100644 --- a/noncore/settings/networksettings/wlan/infoimp.cpp +++ b/noncore/settings/networksettings/wlan/infoimp.cpp @@ -13,7 +13,7 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf WExtensions *wExtensions = new WExtensions(name); if(!wExtensions->doesHaveWirelessExtensions()){ delete wExtensions; - qDebug("WlanInfoImp::No wireless extension"); + odebug << "WlanInfoImp::No wireless extension" << oendl; return; } delete wExtensions; @@ -28,7 +28,7 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf void WlanInfoImp::update(){ WExtensions *wExtensions = new WExtensions(this->name()); if(!wExtensions->doesHaveWirelessExtensions()){ - qDebug("No extension"); + odebug << "No extension" << oendl; delete wExtensions; timer->stop(); return; diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp index d1fff88..9c64323 100644 --- a/noncore/settings/networksettings/wlan/wextensions.cpp +++ b/noncore/settings/networksettings/wlan/wextensions.cpp @@ -112,7 +112,7 @@ int WExtensions::channel(){ left += 0.005; right += 0.005; } - qDebug(QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1()); + odebug << QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1() << oendl; return -1; } @@ -177,12 +177,12 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){ wstream >> name >> status >> quality >> c >> signal >> c >> noise; if(name == QString("%1:").arg(interface)){ if ( quality > 92 ) - qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); + odebug << "WIFIAPPLET: D'oh! Quality " << quality << " > estimated max!\n" << oendl; if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) - qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); + odebug << "WIFIAPPLET: Doh! Strength " << signal << " > estimated max!\n" << oendl; if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) - qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); - //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); + odebug << "WIFIAPPLET: Doh! Noise " << noise << " > estimated max!\n" << oendl; + //odebug << QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1() << oendl; signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; quality = ( quality*100 ) / 92; @@ -190,7 +190,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){ } } - qDebug("WExtensions::statsCard no longer present."); + odebug << "WExtensions::statsCard no longer present." << oendl; quality = -1; signal = IW_LOWER; noise = IW_LOWER; diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 80a9927..fe7941d 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -45,7 +45,7 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W parseSettingFile(); } else - qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); + odebug << QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1() << oendl; connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); } @@ -146,7 +146,7 @@ void WLANImp::changeAndSaveSettingFile(){ QFile file(wlanFile); if (!file.open(IO_ReadWrite)){ - qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); + odebug << QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1() << oendl; return; } @@ -236,7 +236,7 @@ void WLANImp::accept(){ insert << "cardctl eject && cardctl insert"; if (!insert.start(OProcess::DontCare, OProcess::NoCommunication) ) { - qWarning("could not start cardctl"); + owarn << "could not start cardctl" << oendl; } // Close out the dialog diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index eeebe7f..e483efe 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp @@ -52,7 +52,7 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W // Check sanity - the existance of the wireless-tools if-pre-up script QFile file(QString(PREUP)); if (file.exists()) { - qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); + owarn << QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools") << oendl; } connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) ); @@ -233,7 +233,7 @@ void WLANImp::writeOpts() { } bool error = false; - qDebug("setting wlan interface %s", interfaces->getInterfaceName( error ).latin1() ); + odebug << "setting wlan interface " << interfaces->getInterfaceName( error ).latin1() << "" << oendl; if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!"); @@ -307,7 +307,7 @@ void WLANImp::writeOpts() { void WLANImp::rescanNeighbourhood() { QString name = interface->getInterfaceName(); - qDebug( "rescanNeighbourhood via '%s'", (const char*) name ); + odebug << "rescanNeighbourhood via '" << (const char*) name << "'" << oendl; OWirelessNetworkInterface* wiface = static_cast<OWirelessNetworkInterface*>( ONetwork::instance()->interface( name ) ); assert( wiface ); @@ -330,12 +330,12 @@ void WLANImp::rescanNeighbourhood() } if ( devicetype.isEmpty() ) { - qWarning( "rescanNeighbourhood(): couldn't guess device type :(" ); + owarn << "rescanNeighbourhood(): couldn't guess device type :(" << oendl; return; } else { - qDebug( "rescanNeighbourhood(): device type seems to be '%s'", (const char*) devicetype ); + odebug << "rescanNeighbourhood(): device type seems to be '" << (const char*) devicetype << "'" << oendl; } // configure interface to receive 802.11 management frames @@ -349,14 +349,14 @@ void WLANImp::rescanNeighbourhood() else if ( devicetype == "orinoco" ) wiface->setMonitoring( new OOrinocoMonitoringInterface( wiface, false ) ); else { - qDebug( "rescanNeighbourhood(): unsupported device type for monitoring :(" ); + odebug << "rescanNeighbourhood(): unsupported device type for monitoring :(" << oendl; return; } wiface->setMode( "monitor" ); if ( wiface->mode() != "monitor" ) { - qWarning( "rescanNeighbourhood(): Unable to bring device into monitor mode (%s).", strerror( errno ) ); + owarn << "rescanNeighbourhood(): Unable to bring device into monitor mode (" << strerror( errno ) << ")." << oendl; return; } @@ -365,7 +365,7 @@ void WLANImp::rescanNeighbourhood() cap->open( name ); if ( !cap->isOpen() ) { - qWarning( "rescanNeighbourhood(): Unable to open libpcap (%s).", strerror( errno ) ); + owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl; return; } @@ -398,15 +398,15 @@ void WLANImp::rescanNeighbourhood() wiface->setChannel( i ); pb->setProgress( i ); qApp->processEvents(); - qDebug( "rescanNeighbourhood(): listening on channel %d...", i ); + odebug << "rescanNeighbourhood(): listening on channel " << i << "..." << oendl; OPacket* p = cap->next( 1000 ); if ( !p ) { - qDebug( "rescanNeighbourhood(): nothing received on channel %d", i ); + odebug << "rescanNeighbourhood(): nothing received on channel " << i << "" << oendl; } else { - qDebug( "rescanNeighbourhood(): TADAA - something came in on channel %d", i ); + odebug << "rescanNeighbourhood(): TADAA - something came in on channel " << i << "" << oendl; handlePacket( p ); } } @@ -439,7 +439,7 @@ void WLANImp::handlePacket( OPacket* p ) } else { - qWarning( "handlePacket(): invalid frame [possibly noise] detected!" ); + owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl; return; } diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 74d7f8e..886af10 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp @@ -122,13 +122,13 @@ bool WLANModule::remove(Interface*){ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) { - qDebug("WLANModule::receive "+param); + odebug << "WLANModule::receive "+param << oendl; QStringList params = QStringList::split(",",param); int count = params.count(); - qDebug("WLANModule got %i params", count ); + odebug << "WLANModule got " << count << " params" << oendl; if (count < 2){ - qDebug("Erorr less than 2 parameter"); - qDebug("RETURNING"); + odebug << "Erorr less than 2 parameter" << oendl; + odebug << "RETURNING" << oendl; return; } @@ -137,38 +137,38 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) QString action; int countMsgs = 0; stream >> interface; - qDebug("got count? >%s<",interface.latin1()); + odebug << "got count? >" << interface.latin1() << "<" << oendl; if (interface == "count"){ - qDebug("got count"); + odebug << "got count" << oendl; stream >> action; - qDebug("Got count num >%s<", action.latin1()); + odebug << "Got count num >" << action.latin1() << "<" << oendl; countMsgs = action.toInt(); } QDialog *toShow; //while (! stream.atEnd() ){ for (int i = 0; i < countMsgs; i++){ - qDebug("start stream %d/%d",i,countMsgs); + odebug << "start stream " << i << "/" << countMsgs << "" << oendl; if (stream.atEnd()){ - qDebug("end of stream"); + odebug << "end of stream" << oendl; return; } stream >> interface; - qDebug("got iface"); + odebug << "got iface" << oendl; stream >> action; - qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); + odebug << "WLANModule got interface " << interface.latin1() << " and acion " << action.latin1() << "" << oendl; // 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()); + odebug << "WLANModule found interface " << interface.latin1() << "" << oendl; ifa = i; } } if (ifa == 0){ - qDebug("WLANModule Did not find %s",interface.latin1()); - qDebug("skipping"); + odebug << "WLANModule Did not find " << interface.latin1() << "" << oendl; + odebug << "skipping" << oendl; count = 0; } @@ -195,9 +195,9 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) } QPEApplication::showWidget( wlanconfigWiget ); stream >> value; - qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); + odebug << "WLANModule (build 4) is setting " << action.latin1() << " of " << interface.latin1() << " to " << value.latin1() << "" << oendl; if (value.isEmpty()){ - qDebug("value is empty!!!\nreturning"); + odebug << "value is empty!!!\nreturning" << oendl; return; } if ( action.contains("ESSID") ){ @@ -218,10 +218,10 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) }else if (action.contains("Channel")){ bool ok; - qDebug("converting channel"); + odebug << "converting channel" << oendl; int chan = value.toInt( &ok ); if (ok){ - qDebug("ok setting channel"); + odebug << "ok setting channel" << oendl; wlanconfigWiget->specifyChan->setChecked( true ); wlanconfigWiget->networkChannel->setValue( chan ); } @@ -229,27 +229,27 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) wlanconfigWiget->specifyAp->setChecked( true ); wlanconfigWiget->macEdit->setText( value ); }else - qDebug("wlan plugin has no clue"); + odebug << "wlan plugin has no clue" << oendl; } - qDebug("next stream"); + odebug << "next stream" << oendl; }// while stream - qDebug("end of stream"); + odebug << "end of stream" << oendl; if (toShow) toShow->exec(); - qDebug("returning"); + odebug << "returning" << oendl; } QWidget *WLANModule::getInfo( Interface *i) { - qDebug("WLANModule::getInfo start"); + odebug << "WLANModule::getInfo start" << oendl; WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); info->tabWidget->insertTab(information, "TCP/IP", 0); info->tabWidget->setCurrentPage( 0 ); info->tabWidget->showPage( information ); - if (info->tabWidget->currentPage() == information ) qDebug("infotab OK"); - else qDebug("infotab NOT OK"); - qDebug("current idx %d", info->tabWidget->currentPageIndex()); - qDebug("WLANModule::getInfo return"); + if (info->tabWidget->currentPage() == information ) odebug << "infotab OK" << oendl; + else odebug << "infotab NOT OK" << oendl; + odebug << "current idx " << info->tabWidget->currentPageIndex() << "" << oendl; + odebug << "WLANModule::getInfo return" << oendl; return info; } diff --git a/noncore/settings/sound/sound.pro b/noncore/settings/sound/sound.pro index a3804c3..58e94f3 100644 --- a/noncore/settings/sound/sound.pro +++ b/noncore/settings/sound/sound.pro @@ -1,10 +1,9 @@ -CONFIG += qt warn_on quick-app -HEADERS = soundsettings.h soundsettingsbase.h -SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp -#INTERFACES = soundsettingsbase.ui +CONFIG += qt warn_on quick-app +HEADERS = soundsettings.h soundsettingsbase.h +SOURCES = soundsettings.cpp soundsettingsbase.cpp main.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopiecore2 -TARGET = sound +LIBS += -lqpe -lopiecore2 +TARGET = sound include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 8ad0a3f..d55a751 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp @@ -21,20 +21,24 @@ #include "soundsettings.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/storage.h> +using namespace Opie::Core; +/* QT */ #include <qcheckbox.h> #include <qcombobox.h> #include <qlabel.h> +/* STD */ #include <sys/utsname.h> #include <sys/time.h> #include <sys/types.h> #include <unistd.h> -#include <stdio.h> #include <sys/stat.h> @@ -73,7 +77,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) if (uname(&name) != -1) {// TODO change this here,... QString release=name.release; if( release.find("embedix",0,TRUE) != -1) { - qDebug("IS System Zaurus"); + odebug << "IS System Zaurus" << oendl; systemZaurus=TRUE; } } @@ -85,7 +89,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) #else #endif int sRate=cfg.readNumEntry("SizeLimit", 30); - qDebug("%d",sRate); + odebug << "" << sRate << "" << oendl; if(sRate ==30) timeLimitComboBox->setCurrentItem(0); @@ -143,7 +147,7 @@ void SoundSettings::updateStorageCombo() { for( ; it.current(); ++it ){ const QString name = (*it)->name(); const QString path = (*it)->path(); - qDebug("storage name "+name +" storage path is "+path); + odebug << "storage name "+name +" storage path is "+path << oendl; list << name + ": " +path; if( loc.find( path,0,TRUE) != -1) set = i; @@ -152,7 +156,7 @@ void SoundSettings::updateStorageCombo() { } LocationComboBox->insertStringList(list); - qDebug("set item %d", set); + odebug << "set item " << set << "" << oendl; LocationComboBox->setCurrentItem(set); } @@ -160,7 +164,7 @@ void SoundSettings::setLocation(const QString & string) { Config config( "Vmemo" ); config.setGroup( "System" ); config.writeEntry("RecLocation",string); - qDebug("set location "+string); + odebug << "set location "+string << oendl; config.write(); } diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 96bcdfc..4163fb2 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp @@ -19,6 +19,7 @@ #include "benchmarkinfo.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/ostorageinfo.h> #include <opie2/olistview.h> #include <qpe/qpeapplication.h> @@ -26,6 +27,8 @@ #include <qpe/qpedecoration_qws.h> #include <qpe/resource.h> #include <qpe/config.h> +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include <qclipboard.h> @@ -51,10 +54,7 @@ #define round qRound #endif -using namespace Opie::Ui; -using namespace Opie::Core; extern "C" - { void BenchFFT( void ); double dhry_main( int ); @@ -148,7 +148,7 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) while( !ts.eof() ) { QString machline = ts.readLine(); - qDebug( "sysinfo: parsing benchmark results for '%s'", (const char*) machline ); + odebug << "sysinfo: parsing benchmark results for '" << (const char*) machline << "'" << oendl; QString resline = ts.readLine(); machines.insert( machline, new QStringList( QStringList::split( ",", resline ) ) ); machineCombo->insertItem( machline ); @@ -173,7 +173,7 @@ void BenchmarkInfo::machineActivated( int index ) QStringList* results = machines[ machineCombo->text( index ) ]; if ( !results ) { - qDebug( "sysinfo: no results available." ); + odebug << "sysinfo: no results available." << oendl; return; } QStringList::Iterator it = results->begin(); diff --git a/noncore/settings/tabmanager/tabmanager.cpp b/noncore/settings/tabmanager/tabmanager.cpp index 15aeaf5..4274203 100644 --- a/noncore/settings/tabmanager/tabmanager.cpp +++ b/noncore/settings/tabmanager/tabmanager.cpp @@ -63,7 +63,7 @@ TabManager::~TabManager(){ * NULL then the item is a tab and should be placed as a child of the window. */ void TabManager::rescanFolder(QString directory, QListViewItem* parent){ - //qDebug(QString("rescanFolder: ") + directory.latin1()); + //odebug << QString("rescanFolder: ") + directory.latin1() << oendl; QDir d; d.setPath(directory); @@ -207,7 +207,7 @@ void TabManager::removeItem(){ // If removing failed. if(!removeSuccessful){ - qDebug((QString("removeItem: ") + location).latin1()); + odebug << (QString("removeItem: ") + location).latin1() << oendl; QMessageBox::critical(this, tr("Message"), tr("Can't remove."), tr("Ok") ); return; } @@ -244,7 +244,7 @@ void TabManager::editItem( QListViewItem * item){ TabAppLnk app(itemList[item]); if(!app.isValid()){ - qDebug(QString("editItem: Not a valid applnk file: ") + itemList[item].latin1()); + odebug << QString("editItem: Not a valid applnk file: ") + itemList[item].latin1() << oendl; return; } @@ -273,7 +273,7 @@ void TabManager::editItem( QListViewItem * item){ imageOfFile.convertFromImage(foo); application->iconLineEdit->insertItem(imageOfFile,fileName); } - //qDebug(fi->fileName().latin1()); + //odebug << fi->fileName().latin1() << oendl; ++it; } waitDialog.hide(); @@ -402,8 +402,8 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ QMessageBox::critical(this, tr("Message"), "Can't move application.", tr("Ok") ); return; } - //qDebug((QString("moveApplication: ") + itemList[item]).latin1()); - //qDebug((QString("moveApplication: ") + newFolder).latin1()); + //odebug << (QString("moveApplication: ") + itemList[item]).latin1() << oendl; + //odebug << (QString("moveApplication: ") + newFolder).latin1() << oendl; // Move in the gui item->parent()->takeItem(item); @@ -415,7 +415,7 @@ void TabManager::moveApplication(QListViewItem *item, QListViewItem *newGroup){ if(findInstalledApplication(desktopFile, installedAppFile)) swapInstalledLocation(installedAppFile, desktopFile, newFolder); else - qDebug("moveApplication: No installed app found for dekstop file"); + odebug << "moveApplication: No installed app found for dekstop file" << oendl; // Move application type AppLnk app(newFolder); @@ -464,7 +464,7 @@ bool TabManager::findInstalledApplication(QString desktopFile, QString &installe file.close(); } else - qDebug((QString("findInstalledApplication: Can't open file") + HOME_APP_INSTALL_DIR + "/" + fi->fileName()).latin1()); + odebug << (QString("findInstalledApplication: Can't open file") + HOME_APP_INSTALL_DIR + "/" + fi->fileName()).latin1() << oendl; ++it; // goto next list element } return false; @@ -479,7 +479,7 @@ bool TabManager::findInstalledApplication(QString desktopFile, QString &installe void TabManager::swapInstalledLocation( QString installedAppFile, QString desktopFile, QString newLocation ){ QFile file(installedAppFile); if ( !file.open(IO_ReadOnly) ){ - qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); + odebug << QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1() << oendl; return; } @@ -496,7 +496,7 @@ void TabManager::swapInstalledLocation( QString installedAppFile, QString deskto file.close(); if ( !file.open(IO_ReadWrite) ){ - qDebug(QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1()); + odebug << QString("swapInstalledLocation: Can't edit file: %1").arg(installedAppFile).latin1() << oendl; return; } QTextStream streamOut( &file ); diff --git a/noncore/settings/usermanager/userdialog.cpp b/noncore/settings/usermanager/userdialog.cpp index 5854fe0..3616507 100644 --- a/noncore/settings/usermanager/userdialog.cpp +++ b/noncore/settings/usermanager/userdialog.cpp @@ -11,8 +11,11 @@ #include "passwd.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/odevice.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include <qlayout.h> @@ -26,15 +29,10 @@ #include <unistd.h> #include <signal.h> - -using namespace Opie::Core; - - /** * UserDialog constructor. Setup the dialog, fill the groupComboBox & groupsListView with all groups. * */ -using namespace Opie::Ui; UserDialog::UserDialog(int viewmode, QWidget* parent, const char* name, bool modal, WFlags fl) : QDialog(parent, name, modal, fl) { vm=viewmode; @@ -245,7 +243,7 @@ bool UserDialog::addUser(int uid, int gid) { accounts->findGroup(adduserDialog->groupComboBox->currentText()); adduserDialog->groupID=accounts->gr_gid; - qWarning(QString::number(accounts->gr_gid)); + owarn << QString::number(accounts->gr_gid) << oendl; } if(!(accounts->addUser(adduserDialog->loginLineEdit->text(), adduserDialog->passwordLineEdit->text(), adduserDialog->uidLineEdit->text().toInt(), adduserDialog->groupID, adduserDialog->gecosLineEdit->text(), @@ -374,7 +372,7 @@ bool UserDialog::editUser(const char *username) QStringList tempList=accounts->groupStringList.grep(userRegExp); // Find all entries in the group database, that the user is a member of. for(QStringList::Iterator it=tempList.begin(); it!=tempList.end(); ++it) { // Iterate over all of them. - qWarning(*it); + owarn << *it << oendl; QListViewItemIterator lvit( edituserDialog->groupsListView ); // Compare to all groups. for ( ; lvit.current(); ++lvit ) { @@ -389,7 +387,7 @@ bool UserDialog::editUser(const char *username) tempList=accounts->groupStringList.grep(userRegExp); // Find all entries in the group database, that the user is a member of. for(QStringList::Iterator it=tempList.begin(); it!=tempList.end(); ++it) { // Iterate over all of them. - qWarning(*it); + owarn << *it << oendl; QListViewItemIterator lvit( edituserDialog->groupsListView ); // Compare to all groups. for ( ; lvit.current(); ++lvit ) { diff --git a/noncore/settings/usermanager/usermanager.cpp b/noncore/settings/usermanager/usermanager.cpp index a1130d4..1d345ee 100644 --- a/noncore/settings/usermanager/usermanager.cpp +++ b/noncore/settings/usermanager/usermanager.cpp @@ -9,12 +9,15 @@ #include "usermanager.h" -#include <qlayout.h> +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/resource.h> +using namespace Opie::Core; +/* QT */ +#include <qlayout.h> #include <qmessagebox.h> #include <qfile.h> -#include <qpe/resource.h> - #include <qregexp.h> /** @@ -253,5 +256,5 @@ void UserConfig::delGroup() { void UserConfig::showUserMenu(QListViewItem *item) { // userPopupMenu.exec(item->mapToGlobal(QPoint(0,0))); - qWarning("Pressed!"); + owarn << "Pressed!" << oendl; } diff --git a/noncore/settings/usermanager/usermanager.pro b/noncore/settings/usermanager/usermanager.pro index d0647dd..31f52a6 100644 --- a/noncore/settings/usermanager/usermanager.pro +++ b/noncore/settings/usermanager/usermanager.pro @@ -1,10 +1,9 @@ -#CONFIG = qt warn_on -CONFIG = qt warn_on quick-app +CONFIG = qt warn_on quick-app HEADERS = usermanager.h userdialog.h groupdialog.h passwd.h SOURCES = usermanager.cpp userdialog.cpp groupdialog.cpp passwd.cpp main.cpp INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopiecore2 -lopieui2 -lcrypt -TARGET = usermanager +DEPENDPATH += $(OPIEDIR)/include +LIBS += -lqpe -lopiecore2 -lopieui2 -lcrypt +TARGET = usermanager include ( $(OPIEDIR)/include.pro ) |