author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/net/opietooth | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startdunconnection.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startpanconnection.cpp | 8 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 16 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/devicehandler.cpp | 10 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/dunpopup.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/hciconfwrapper.cpp | 16 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexdialog.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexpopup.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/panpopup.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/popuphelper.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/rfcommassigndialogimpl.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/rfcommconfhandler.cpp | 10 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/rfcpopup.cpp | 8 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/scandialog.cpp | 2 |
16 files changed, 47 insertions, 47 deletions
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 @@ -185,37 +185,37 @@ namespace OpieTooth { } /** * Refresh timer * @param the timer event */ void BluezApplet::timerEvent( QTimerEvent * ) { bool oldactive = bluezactive; int olddiscovery = bluezDiscoveryActive; bluezactive = checkBluezStatus(); bluezDiscoveryActive = checkBluezDiscoveryStatus(); if ((bluezactive != oldactive) || (bluezDiscoveryActive != olddiscovery)) { update(); } } /** * Implementation of the paint event * @param the QPaintEvent */ void BluezApplet::paintEvent( QPaintEvent* ) { QPainter p(this); - qDebug("paint bluetooth pixmap"); + odebug << "paint bluetooth pixmap" << oendl; if (bluezactive > 0) { p.drawPixmap( 0, 1, bluezOnPixmap ); } else { p.drawPixmap( 0, 1, bluezOffPixmap ); } if (bluezDiscoveryActive > 0) { p.drawPixmap( 0, 1, bluezDiscoveryOnPixmap ); } } }; 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 @@ -24,45 +24,45 @@ void StartDunConnection::setName( QString name ) { m_name = name; } QString StartDunConnection::name() { return m_name; } void StartDunConnection::setConnectionType() { m_connectionType = Pan; } StartConnection::ConnectionType StartDunConnection::type() { return m_connectionType; } void StartDunConnection::start() { m_dunConnect = new OProcess(); *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; connect( m_dunConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(Opie::Core::OProcess*) ) ); 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; } } void StartDunConnection::slotExited( OProcess* proc ) { delete m_dunConnect; } void StartDunConnection::slotStdOut(OProcess* proc, char* chars, int len) {} void StartDunConnection::stop() { if ( m_dunConnect ) { delete m_dunConnect; m_dunConnect = 0l; } } 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 @@ -18,67 +18,67 @@ StartPanConnection::~StartPanConnection() { StartPanConnection::StartPanConnection( QString mac ) { m_panConnect = 0l; m_mac = mac; setConnectionType(); } void StartPanConnection::setName( QString name ) { m_name = name; } QString StartPanConnection::name() { return m_name; } void StartPanConnection::setConnectionType() { m_connectionType = Pan; } StartConnection::ConnectionType StartPanConnection::type() { return m_connectionType; } 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*) ) , this, SLOT( slotExited(Opie::Core::OProcess*) ) ); 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; } } void StartPanConnection::slotExited( OProcess* proc ) { delete m_panConnect; m_panConnect = 0l; } void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len) {} void StartPanConnection::stop() { if ( m_panConnect ) { delete m_panConnect; m_panConnect = 0l; } m_panConnect = new OProcess(); - qDebug("IM STOP " + m_mac); + odebug << "IM STOP " + m_mac << oendl; *m_panConnect << "pand" << "--kill" << m_mac; connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(Opie::Core::OProcess*) ) ); 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 @@ -134,49 +134,49 @@ void BlueBase::readConfig() /** * Writes all options to the config file */ void BlueBase::writeConfig() { Config cfg( "bluetoothmanager" ); cfg.setGroup( "bluezsettings" ); cfg.writeEntry( "name" , m_deviceName ); cfg.writeEntryCrypt( "passkey" , m_defaultPasskey ); cfg.writeEntry( "useEncryption" , m_useEncryption ); cfg.writeEntry( "enableAuthentification" , m_enableAuthentification ); cfg.writeEntry( "enablePagescan" , m_enablePagescan ); cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); writeToHciConfig(); } /** * Modify the hcid.conf file to our needs */ void BlueBase::writeToHciConfig() { - qWarning("writeToHciConfig"); + owarn << "writeToHciConfig" << oendl; HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); hciconf.load(); hciconf.setPinHelper( "/opt/QtPalmtop/bin/bluepin" ); hciconf.setName( m_deviceName ); hciconf.setEncrypt( m_useEncryption ); hciconf.setAuth( m_enableAuthentification ); hciconf.setPscan( m_enablePagescan ); hciconf.setIscan( m_enableInquiryscan ); hciconf.save(); } /** * Read the list of allready known devices */ void BlueBase::readSavedDevices() { QValueList<RemoteDevice> loadedDevices; DeviceHandler handler; loadedDevices = handler.load(); addSearchedDevices( loadedDevices ); } @@ -346,105 +346,105 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin } delete groups; } /* * We got service sensitive PopupMenus in our factory * We will create one through the factory and will insert * our Separator + ShowInfo into the menu or create a new * one if the factory returns 0 * PopupMenu deletion is kind of weird. * If escaped( -1 ) or any of our items were chosen we'll * delete the PopupMenu otherwise it's the responsibility of * the PopupMenu to delete itself * */ else if ( ((BTListItem*)item)->type() == "service") { BTServiceItem* service = (BTServiceItem*)item; QMap<int, QString> list = service->services().classIdList(); QMap<int, QString>::Iterator it = list.begin(); 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 ) { ; } else if ( ret == test1 ) { ; } delete popup; } delete menu; } /** * Search and display avail. services for a device (on expand from device listing) * @param item the service item returned */ 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 ); // and some time later I get a signal foundServices( const QString& device, Services::ValueList ); back m_localDevice->searchServices( device ); } /** * Overloaded. This one it the one that is ted to the foundServices signal * @param device the mac address of the remote device * @param servicesList the list with the service the device has. */ void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) { - qDebug("fill services list"); + odebug << "fill services list" << oendl; QMap<QString,BTDeviceItem*>::Iterator it; BTDeviceItem* deviceItem = 0; // get the right devices which requested the search it = m_deviceList.find( device ); if( it == m_deviceList.end() ) return; deviceItem = it.data(); // remove previous entries QList<QListViewItem> tempList; tempList.setAutoDelete( true ); QListViewItem * child = deviceItem->firstChild(); while( child ) { tempList.append( child ); child = child->nextSibling(); } tempList.clear(); QValueList<OpieTooth::Services>::Iterator it2; BTServiceItem* serviceItem; @@ -586,49 +586,49 @@ void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList ) // recall connection search after some time QTimer::singleShot( 15000, this, SLOT( addConnectedDevices() ) ); } /** * Find out if a device can currently be reached * @param device */ void BlueBase::deviceActive( const RemoteDevice &device ) { // search by mac, async, gets a signal back // We should have a BTDeviceItem there or where does it get added to the map -zecke m_localDevice->isAvailable( device.mac() ); } /** * The signal catcher. Set the avail. status on device. * @param device - the mac address * @param connected - if it is avail. or not */ void BlueBase::deviceActive( const QString& device, bool connected ) { - qDebug("deviceActive slot"); + odebug << "deviceActive slot" << oendl; QMap<QString,BTDeviceItem*>::Iterator it; it = m_deviceList.find( device ); if( it == m_deviceList.end() ) return; BTDeviceItem* deviceItem = it.data(); if ( connected ) { deviceItem->setPixmap( 1, m_onPix ); } else { deviceItem->setPixmap( 1, m_offPix ); } m_deviceList.remove( it ); } /** * Open the "scan for devices" dialog 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 @@ -12,76 +12,76 @@ DeviceHandler::DeviceHandler() { }; DeviceHandler::~DeviceHandler() { } RemoteDevice::ValueList DeviceHandler::load() { RemoteDevice::ValueList list; QString path = QDir::homeDirPath() + "/Settings/bluetooth"; QDir deviceListSave( path); // list of .conf files QStringList devicesFileList = deviceListSave.entryList(); // cut .conf of to get the mac and also read the name entry in it. if (!devicesFileList.isEmpty() ) { QString name; QString mac; QStringList::Iterator it; for (it = devicesFileList.begin(); it != devicesFileList.end(); ++it ) { 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 ); list.append( currentDevice ); } } return list; }; /* * This is some how rude but make sure all old devices * are getting deleted */ void DeviceHandler::save( const RemoteDevice::ValueList& list) { QCString rm; rm += "rm -rf "; rm += QDir::homeDirPath() + "/Settings/bluetooth"; system ( rm.data() ); if (list.isEmpty() ) // no need to create the dir return; /** * Create a new dir */ 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/" + (*it).mac() + ".conf", Config::File ); conf.setGroup( "Info" ); conf.writeEntry( "name", (*it).name() ); conf.writeEntry( "mac", (*it).mac() ); } } 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 @@ -1,38 +1,38 @@ #include <qpe/qcopenvelope_qws.h> #include <qtimer.h> #include "dunpopup.h" using namespace OpieTooth; /* * c'tor init the QAction */ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("DunPopup c'tor"); + owarn << "DunPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; m_dunconnection = 0l; /* connect action */ a = new QAction(); // so it's get deleted a->setText( tr("connect") ); a->addTo( this ); connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) ); b = new QAction(); b->setText( tr( "connect+conf" ) ); b->addTo( this ); connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) ); c = new QAction(); c->setText( tr( "disconnect" ) ); c->addTo( this ); connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) ); 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 @@ -53,87 +53,87 @@ namespace OpieTooth { } void HciConfWrapper::setEncrypt( bool enable) { if ( enable ) { setValue( "encrypt" , "enable" ); } else { setValue( "encrypt" , "disable" ); } } void HciConfWrapper::setValue(const QString &key, const QString &value ) { if (m_file.isEmpty() ) // load first return; QStringList::Iterator it; QString str; 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 } } } /** * This loads the config file and stores it inside * 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; } /** * readAll() into a QByteArray * QStringList::split('\n', array ) * would this be faster? -zecke */ QTextStream stream(&file ); QString tmp; while ( !stream.atEnd() ) { tmp = stream.readLine(); m_file.append( tmp ); } } 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; } QTextStream stream(&file ); QStringList::Iterator it; 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 @@ -59,31 +59,31 @@ void ObexDialog::browse() { MimeTypes types; QStringList all; all << "*/*"; types.insert("All Files", all ); QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); cmdLine->setText( str ); } void ObexDialog::sendData() { QString fileURL = cmdLine->text(); QString file = QFileInfo( fileURL ).fileName(); QString modifiedName = chNameLine->text(); // vom popupmenu beziehen OProcess* obexSend = new OProcess(); if ( !modifiedName.isEmpty() ) { *obexSend << "ussp-push" << m_device << fileURL << modifiedName; } else { *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 @@ -1,45 +1,45 @@ #include "obexdialog.h" #include "obexpopup.h" /* OPIE */ #include <qpe/qpeapplication.h> /* QT */ #include <qtimer.h> using namespace OpieTooth; /* * c'tor init the QAction */ ObexPopup::ObexPopup() : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; /* connect action */ a = new QAction( ); // so it's get deleted a->setText("Push file"); a->addTo( this ); connect( a, SIGNAL( activated() ), this, SLOT( slotPush() ) ); }; 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 @@ -1,38 +1,38 @@ #include <qpe/qcopenvelope_qws.h> #include <qtimer.h> #include "panpopup.h" using namespace OpieTooth; /* * c'tor init the QAction */ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("PanPopup c'tor"); + owarn << "PanPopup c'tor" << oendl; m_item = item; QAction *a, *b, *c; m_panconnection = 0l; /* connect action */ a = new QAction(); // so it's get deleted a->setText( tr("connect") ); a->addTo( this ); connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) ); b = new QAction(); b->setText( tr( "connect+conf" ) ); b->addTo( this ); connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) ); c = new QAction(); c->setText( tr( "disconnect" ) ); c->addTo( this ); connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) ); 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 @@ -1,36 +1,36 @@ #include "stdpopups.h" #include "popuphelper.h" using namespace OpieTooth; PopupHelper::PopupHelper() { init(); } PopupHelper::~PopupHelper() { } void PopupHelper::insert( int id, popupFactory fact ) { m_map.insert(id, 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); } return 0l; } void PopupHelper::init() { insert( 4355, newRfcComPopup ); insert( 4354, newDunPopup ); insert( 4353, newRfcComPopup ); insert( 4357, newObexPushPopup ); insert( 4358, newObexPushPopup ); insert( 4374, newPanPopup ); } 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 @@ -35,35 +35,35 @@ PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, connectButton = new QPushButton( this ); connectButton->setText( tr( "Connect" ) ); layout->addWidget(info); layout->addWidget(cmdLine); layout->addWidget(outPut); layout->addWidget(connectButton); connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) ); } PPPDialog::~PPPDialog() { } void PPPDialog::connectToDevice() { outPut->clear(); // vom popupmenu beziehen QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); OProcess* pppDial = new OProcess(); *pppDial << "pppd" << m_device << "call" << connectScript; 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; } } void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) { QCString str(cha, len ); outPut->insertLine( str ); 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 @@ -50,70 +50,70 @@ void RfcommAssignDialog::newDevice( const QString & mac ) { for ( int i = 0 ; i < m_range; i++ ) { QMap<QString, RfCommConfObject*>::Iterator it; it = confHandler->foundEntries().find( QString("%1").arg( i ) ); // make sure that rfcommX is not assigned yet if ( it == confHandler->foundEntries().end() ) { QDialog dialog( this, "newdevice", true, WStyle_ContextHelp ); RfcommDialogItem *newDev = new RfcommDialogItem( &dialog ); newDev->setIdent( i ); newDev->setMac( mac ); if ( QPEApplication::execDialog( &dialog ) == QDialog::Accepted ) { RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box ); m_itemList.insert( i , rfcomm ); rfcomm->setIdent( i ); rfcomm->setMac( mac ); rfcomm->setChannel( newDev->channel() ); rfcomm->setComment( newDev->comment() ); - qDebug( "New device set up" ); + odebug << "New device set up" << oendl; } } } } void RfcommAssignDialog::loadConfig() { //Config cfg( "bluetoothmanager-rfcommbind" ); for ( int i = 0 ; i < m_range; i++ ) { // cfg.setGroup( QString("%1").arg( i ) ); RfcommDialogItem *rfcomm = new RfcommDialogItem( m_box ); m_itemList.insert( i , rfcomm ); rfcomm->setIdent( i ); QMap<QString, RfCommConfObject*>::Iterator it; 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() ); } /* Use rfcomm.conf directly for now * rfcomm->setMac( cfg.readEntry( "mac", "" ) ); * rfcomm->setChannel( cfg.readNumEntry( "channel", 1 ) ); * rfcomm->setComment( cfg.readEntry( "comment", "" ) ); */ } } void RfcommAssignDialog::saveConfig() { //Config cfg( "bluetoothmanager-rfcommbind" ); QMap< int, RfcommDialogItem*>::Iterator it; QMap< QString, RfCommConfObject*> outMap; for( it = m_itemList.begin(); it != m_itemList.end(); ++it ) { 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 @@ -71,44 +71,44 @@ void RfCommConfHandler::save( QMap<QString, RfCommConfObject*> devices ) { QMap<QString, RfCommConfObject*> RfCommConfHandler::foundEntries() { return m_foundEntries; } void RfCommConfHandler::load() { QFile rfCommConf( m_filename ); if ( rfCommConf.open( IO_ReadOnly ) ) { QStringList list; QTextStream inStream( &rfCommConf ); list = QStringList::split( "\n", inStream.read() ); QString number; QString mac; QString channel; QString comment; for ( QStringList::Iterator line=list.begin(); line != list.end(); line++ ) { QString tmpLine = ( *line ).stripWhiteSpace(); 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 @@ -1,44 +1,44 @@ #include "pppdialog.h" #include "rfcpopup.h" #include "rfcommassigndialogimpl.h" /* OPIE */ #include <qpe/qpeapplication.h> /* QT */ #include <qtimer.h> using namespace OpieTooth; /* * c'tor init the QAction */ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - qWarning("RfcCommPopup c'tor"); + owarn << "RfcCommPopup c'tor" << oendl; QAction* a; m_item = item; /* connect action */ a = new QAction( ); // so it's get deleted a->setText("Connect"); a->addTo( this ); connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) ); /* disconnect action */ a = new QAction( ); a->setText("Disconnect"); a->addTo( this ); connect( a, SIGNAL( activated() ) , this, SLOT( slotDisconnect() ) ); /* foo action */ a = new QAction( ); @@ -49,55 +49,55 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) /* bar action */ a = new QAction( ); a->setText( "Bar" ); a->addTo( this ); connect( a, SIGNAL( activated() ), this, SLOT( slotBar() ) ); }; RfcCommPopup::~RfcCommPopup() { /* delete m_con; delete m_dis; delete m_foo; delete m_bar; */ } void RfcCommPopup::slotConnect() { - qWarning("connect"); + owarn << "connect" << oendl; PPPDialog pppDialog; QPEApplication::execDialog( &pppDialog ); } void RfcCommPopup::slotDisconnect() { - qWarning("slot disconnected"); + owarn << "slot disconnected" << oendl; } void RfcCommPopup::slotBind() { RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp ); rfcommAssign.newDevice( m_item->mac() ); if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted ) { rfcommAssign.saveConfig(); } } 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 @@ -134,28 +134,28 @@ namespace OpieTooth { * Then it emits it, so the manager can connect to the signal to fill the listing. */ void ScanDialog::emitToManager() { if (!ListView1) { return; } QValueList<RemoteDevice> deviceList; QListViewItemIterator it( ListView1 ); for ( ; it.current(); ++it ) { if ( ( (QCheckListItem*)it.current() )->isOn() ) { RemoteDevice device( it.current()->text(1), it.current()->text(0) ); deviceList.append( device ); } } emit selectedDevices( deviceList ); } /** * Cleanup */ ScanDialog::~ScanDialog() { - qWarning("delete scan dialog"); + owarn << "delete scan dialog" << oendl; delete localDevice; } } |