From 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Sun, 04 Apr 2004 13:54:40 +0000 Subject: convert to Opie Debugging Framework --- (limited to 'noncore/net/opietooth') diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 8a7f0bc..1d93f5c 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -206,7 +206,7 @@ namespace OpieTooth { */ void BluezApplet::paintEvent( QPaintEvent* ) { QPainter p(this); - qDebug("paint bluetooth pixmap"); + odebug << "paint bluetooth pixmap" << oendl; if (bluezactive > 0) { p.drawPixmap( 0, 1, bluezOnPixmap ); diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp index 09b19d2..37f2ae7 100644 --- a/noncore/net/opietooth/lib/startdunconnection.cpp +++ b/noncore/net/opietooth/lib/startdunconnection.cpp @@ -45,7 +45,7 @@ void StartDunConnection::start() { connect( m_dunConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not start" ); + owarn << "could not start" << oendl; delete m_dunConnect; } } diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp index 24ac530..50afc9f 100644 --- a/noncore/net/opietooth/lib/startpanconnection.cpp +++ b/noncore/net/opietooth/lib/startpanconnection.cpp @@ -39,7 +39,7 @@ StartConnection::ConnectionType StartPanConnection::type() { void StartPanConnection::start() { m_panConnect = new OProcess(); - qDebug( "IM START " + m_mac ); + odebug << "IM START " + m_mac << oendl; *m_panConnect << "pand" << "--connect" << m_mac; connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , @@ -47,7 +47,7 @@ void StartPanConnection::start() { connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not start" ); + owarn << "could not start" << oendl; delete m_panConnect; } } @@ -68,7 +68,7 @@ void StartPanConnection::stop() { m_panConnect = 0l; } m_panConnect = new OProcess(); - qDebug("IM STOP " + m_mac); + odebug << "IM STOP " + m_mac << oendl; *m_panConnect << "pand" << "--kill" << m_mac; @@ -77,7 +77,7 @@ void StartPanConnection::stop() { connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(Opie::Core::OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { - qWarning( "could not stop" ); + owarn << "could not stop" << oendl; delete m_panConnect; } } diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 29030ab..b1cddd2 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -155,7 +155,7 @@ void BlueBase::writeConfig() */ void BlueBase::writeToHciConfig() { - qWarning("writeToHciConfig"); + owarn << "writeToHciConfig" << oendl; HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); hciconf.load(); hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); @@ -367,25 +367,25 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin QPopupMenu *popup =0l; if ( it != list.end() ) { - qWarning("Searching id %d %s", it.key(), it.data().latin1() ); + owarn << "Searching id " << it.key() << " " << it.data().latin1() << "" << oendl; popup = m_popHelper.find( it.key(), service->services(), (BTDeviceItem*)service->parent() ); } else { - qWarning("Empty"); + owarn << "Empty" << oendl; } if ( popup == 0l ) { - qWarning("factory returned 0l"); + owarn << "factory returned 0l" << oendl; popup = new QPopupMenu(); } int test1 = popup->insertItem( tr("Test1:"), 2); ret = popup->exec( point ); - qWarning("returned from exec() "); + owarn << "returned from exec() " << oendl; if ( ret == -1 ) { ; @@ -406,7 +406,7 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin */ void BlueBase::addServicesToDevice( BTDeviceItem * item ) { - qDebug("addServicesToDevice"); + odebug << "addServicesToDevice" << oendl; // row of mac adress text(3) RemoteDevice device = item->remoteDevice(); m_deviceList.insert( item->mac() , item ); @@ -423,7 +423,7 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item ) */ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) { - qDebug("fill services list"); + odebug << "fill services list" << oendl; QMap::Iterator it; BTDeviceItem* deviceItem = 0; @@ -607,7 +607,7 @@ void BlueBase::deviceActive( const RemoteDevice &device ) */ void BlueBase::deviceActive( const QString& device, bool connected ) { - qDebug("deviceActive slot"); + odebug << "deviceActive slot" << oendl; QMap::Iterator it; diff --git a/noncore/net/opietooth/manager/devicehandler.cpp b/noncore/net/opietooth/manager/devicehandler.cpp index 9c5b817..bd34351 100644 --- a/noncore/net/opietooth/manager/devicehandler.cpp +++ b/noncore/net/opietooth/manager/devicehandler.cpp @@ -33,13 +33,13 @@ QString path = QDir::homeDirPath() + "/Settings/bluetooth"; if ( (*it) == "." || (*it) == ".." ) continue; - qDebug((*it).latin1() ); + odebug << (*it).latin1() << oendl; Config conf(path + "/"+(*it), Config::File); conf.setGroup("Info"); name = conf.readEntry("name", "Error"); mac = conf.readEntry("mac", QString::null); - qDebug("MAC: " + mac); - qDebug("NAME: " + name); + odebug << "MAC: " + mac << oendl; + odebug << "NAME: " + name << oendl; if (mac.isEmpty() ) continue; RemoteDevice currentDevice( mac , name ); @@ -66,14 +66,14 @@ void DeviceHandler::save( const RemoteDevice::ValueList& list) { */ rm = "mkdir "; rm += QDir::homeDirPath() + "/Settings/bluetooth"; - qWarning("out %s", rm.data() ); + owarn << "out " << rm.data() << "" << oendl; system( rm.data() ); RemoteDevice::ValueList::ConstIterator it; // write the config for ( it = list.begin(); it != list.end(); ++it ) { - qDebug( "/Settings/bluetooth/" + (*it).mac() + ".conf"); + odebug << "/Settings/bluetooth/" + (*it).mac() + ".conf" << oendl; Config conf( QDir::homeDirPath() + "/Settings/bluetooth/" + diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp index 3043f71..5b01d2f 100644 --- a/noncore/net/opietooth/manager/dunpopup.cpp +++ b/noncore/net/opietooth/manager/dunpopup.cpp @@ -11,7 +11,7 @@ using namespace OpieTooth; */ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("DunPopup c'tor"); + owarn << "DunPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp index 35e9cd9..71c935c 100644 --- a/noncore/net/opietooth/manager/hciconfwrapper.cpp +++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp @@ -74,16 +74,16 @@ namespace OpieTooth { for (it = m_file.begin(); it != m_file.end(); ++it ) { str = (*it); if( (str.contains(key)) > 0 ) { - qDebug("Found"); + odebug << "Found" << oendl; // still need to look if its commented out!!! str.simplifyWhiteSpace(); - qDebug( key ); + odebug << key << oendl; if (str.startsWith("#")) { str = (key + " " + value + ";"); } else { str = str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";"); } - qDebug( str ); + odebug << str << oendl; it = m_file.remove( it ); it = m_file.insert( it, str ); //return; the regexp is too wide -zecke // all set @@ -98,11 +98,11 @@ namespace OpieTooth { * the m_file */ void HciConfWrapper::load() { - qWarning("loaded"); + owarn << "loaded" << oendl; m_file.clear(); QFile file( m_fileName ); if (!file.open( IO_ReadOnly ) ) { - qDebug("Could not open"); + odebug << "Could not open" << oendl; return; } @@ -119,13 +119,13 @@ namespace OpieTooth { } } void HciConfWrapper::save() { - qWarning("save"); + owarn << "save" << oendl; if (m_file.isEmpty() ) // load first return; QFile file( m_fileName ); if ( !file.open(IO_WriteOnly ) ) { - qWarning("could not open %s", m_fileName.latin1() ); + owarn << "could not open " << m_fileName.latin1() << "" << oendl; return; } @@ -134,6 +134,6 @@ namespace OpieTooth { for ( it = m_file.begin(); it != m_file.end(); ++it ) { stream << (*it) << endl; } - qWarning("saved"); + owarn << "saved" << oendl; }; } diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index 1ef862a..3a3dbb0 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp @@ -80,7 +80,7 @@ void ObexDialog::sendData() { *obexSend << "ussp-push" << m_device << fileURL << file; } if (!obexSend->start(OProcess::DontCare, OProcess::AllOutput) ) { - qWarning("could not start"); + owarn << "could not start" << oendl; delete obexSend; } diff --git a/noncore/net/opietooth/manager/obexpopup.cpp b/noncore/net/opietooth/manager/obexpopup.cpp index d147d52..9a50199 100644 --- a/noncore/net/opietooth/manager/obexpopup.cpp +++ b/noncore/net/opietooth/manager/obexpopup.cpp @@ -16,7 +16,7 @@ using namespace OpieTooth; ObexPopup::ObexPopup() : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; @@ -36,7 +36,7 @@ ObexPopup::~ObexPopup() void ObexPopup::slotPush() { - qWarning("push something"); + owarn << "push something" << oendl; ObexDialog obexDialog; QPEApplication::execDialog( &obexDialog ); diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp index 8b05964..43c2777 100644 --- a/noncore/net/opietooth/manager/panpopup.cpp +++ b/noncore/net/opietooth/manager/panpopup.cpp @@ -11,7 +11,7 @@ using namespace OpieTooth; */ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("PanPopup c'tor"); + owarn << "PanPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp index ab22fea..19deb19 100644 --- a/noncore/net/opietooth/manager/popuphelper.cpp +++ b/noncore/net/opietooth/manager/popuphelper.cpp @@ -16,10 +16,10 @@ void PopupHelper::insert( int id, popupFactory fact ) { } QPopupMenu* PopupHelper::find( int id, const Services& ser, BTDeviceItem* item ) { - //qWarning("find"); + //owarn << "find" << oendl; FactoryMap::Iterator it = m_map.find(id ); if ( it != m_map.end() ) { - //qWarning("found"); + //owarn << "found" << oendl; popupFactory fact = it.data(); return (*fact)(ser, item); } diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp index 78c1501..989bf45 100644 --- a/noncore/net/opietooth/manager/pppdialog.cpp +++ b/noncore/net/opietooth/manager/pppdialog.cpp @@ -56,7 +56,7 @@ void PPPDialog::connectToDevice() { connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT(fillOutPut(Opie::Core::OProcess*,char*,int) ) ); if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { - qWarning("could not start"); + owarn << "could not start" << oendl; delete pppDial; } } diff --git a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp index fc76301..4469129 100644 --- a/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp +++ b/noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp @@ -71,7 +71,7 @@ void RfcommAssignDialog::newDevice( const QString & mac ) rfcomm->setMac( mac ); rfcomm->setChannel( newDev->channel() ); rfcomm->setComment( newDev->comment() ); - qDebug( "New device set up" ); + odebug << "New device set up" << oendl; } } } @@ -92,7 +92,7 @@ void RfcommAssignDialog::loadConfig() it = confHandler->foundEntries().find( QString("%1").arg( i ) ); if ( it != confHandler->foundEntries().end() ) { - qDebug( "Found key in foundEntries() " ); + odebug << "Found key in foundEntries() " << oendl; rfcomm->setMac( it.data()->mac() ); rfcomm->setChannel( it.data()->channel() ); rfcomm->setComment( it.data()->comment() ); diff --git a/noncore/net/opietooth/manager/rfcommconfhandler.cpp b/noncore/net/opietooth/manager/rfcommconfhandler.cpp index 20453e8..2ef95ff 100644 --- a/noncore/net/opietooth/manager/rfcommconfhandler.cpp +++ b/noncore/net/opietooth/manager/rfcommconfhandler.cpp @@ -92,23 +92,23 @@ void RfCommConfHandler::load() { if ( tmpLine.startsWith("rfcomm") ) { QString number = tmpLine.mid( 6,1 ); - qDebug( tmpLine ); - qDebug( "TEST " + number ); + odebug << tmpLine << oendl; + odebug << "TEST " + number << oendl; } else if ( tmpLine.startsWith( "}" ) ) { m_foundEntries.insert( number, new RfCommConfObject( number.toInt(), mac, channel.toInt(), comment ) ); } else if ( tmpLine.startsWith( "device" ) ) { mac = tmpLine.mid( 7, 17 ); - qDebug( "mac" + mac ); + odebug << "mac" + mac << oendl; } else if ( tmpLine.startsWith( "channel" ) ) { channel = tmpLine.mid( 8, 1 ); qDebug ( "Channel :" + channel ); } else if ( tmpLine.startsWith( "comment" ) ) { comment = tmpLine.mid( 9, tmpLine.find( ';' ) - 9 - 1 ); - qDebug( "Comment: " + comment ); + odebug << "Comment: " + comment << oendl; } } rfCommConf.close(); } save( m_foundEntries ); - qDebug( QString( "ENTries: %1").arg( m_foundEntries.count() ) ); + odebug << QString( "ENTries: %1").arg( m_foundEntries.count() ) << oendl; } diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp index 04bfe48..01ad616 100644 --- a/noncore/net/opietooth/manager/rfcpopup.cpp +++ b/noncore/net/opietooth/manager/rfcpopup.cpp @@ -17,7 +17,7 @@ using namespace OpieTooth; RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; @@ -70,7 +70,7 @@ RfcCommPopup::~RfcCommPopup() void RfcCommPopup::slotConnect() { - qWarning("connect"); + owarn << "connect" << oendl; PPPDialog pppDialog; QPEApplication::execDialog( &pppDialog ); @@ -79,7 +79,7 @@ void RfcCommPopup::slotConnect() void RfcCommPopup::slotDisconnect() { - qWarning("slot disconnected"); + owarn << "slot disconnected" << oendl; } @@ -98,6 +98,6 @@ void RfcCommPopup::slotBind() void RfcCommPopup::slotBar() { - qWarning("slotBar"); + owarn << "slotBar" << oendl; }; diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp index c8ea3e3..3b005c4 100644 --- a/noncore/net/opietooth/manager/scandialog.cpp +++ b/noncore/net/opietooth/manager/scandialog.cpp @@ -155,7 +155,7 @@ namespace OpieTooth { * Cleanup */ ScanDialog::~ScanDialog() { - qWarning("delete scan dialog"); + owarn << "delete scan dialog" << oendl; delete localDevice; } } -- cgit v0.9.0.2