From f1708be741dfb73ceaffb633b44093f2cb2b3d57 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Mon, 05 Apr 2004 12:48:49 +0000 Subject: convert core/applets/* to Opie debug framework --- (limited to 'core/obex') diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp index cd8d58e..f3dd11c 100644 --- a/core/obex/obexsend.cpp +++ b/core/obex/obexsend.cpp @@ -1,19 +1,20 @@ +#include "obex.h" +#include "obexsend.h" +using namespace OpieObex; + +/* OPIE */ +#include +#include +using namespace Opie::Core; + +/* QT */ #include #include #include #include - -#include - -#include "obex.h" -#include "obexsend.h" - -using namespace OpieObex; - /* TRANSLATOR OpieObex::SendWidget */ - SendWidget::SendWidget( QWidget* parent, const char* name ) : QWidget( parent, name ) { initUI(); @@ -104,7 +105,7 @@ void SendWidget::send( const QString& file, const QString& desc ) { } } void SendWidget::slotIrDaDevices( const QStringList& list) { - qWarning("slot it irda devices "); + owarn << "slot it irda devices " << oendl; for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { int id = m_devBox->addDevice( (*it), DeviceBox::IrDa, tr("Scheduling for beam.") ); m_irDa.insert( id, (*it) ); @@ -123,7 +124,7 @@ void SendWidget::slotBTDevices( const QMap& str ) { m_devBox->removeDevice( m_btDeSearch ); } void SendWidget::slotSelectedDevice( int name, int dev ) { - qWarning("Start beam? %d %d", name, dev ); + owarn << "Start beam? " << name << " " << dev << "" << oendl; if ( name == m_irDeSearch ) { for (QMap::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it ) m_devBox->removeDevice( it.key() ); @@ -132,7 +133,7 @@ void SendWidget::slotSelectedDevice( int name, int dev ) { } } void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) { - qWarning("dispatch irda %s", str.data() ); + owarn << "dispatch irda " << str.data() << "" << oendl; if ( str == "devices(QStringList)" ) { QDataStream stream( ar, IO_ReadOnly ); QStringList list; @@ -147,7 +148,7 @@ void SendWidget::slotIrError( int ) { } void SendWidget::slotIrSent( bool b) { - qWarning("irda sent!!"); + owarn << "irda sent!!" << oendl; QString text = b ? tr("Sent") : tr("Failure"); m_devBox->setStatus( m_irDaIt.key(), text ); ++m_irDaIt; @@ -204,7 +205,7 @@ void DeviceBox::setStatus( int id, const QString& status ) { setText( allText() ); } void DeviceBox::setSource( const QString& str ) { - qWarning("SetSource:%d", str.toInt() ); + owarn << "SetSource:" << str.toInt() << "" << oendl; int id = str.toInt(); emit selectedDevice( id, m_dev[id].device() ); } diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp index ee2668b..8885256 100644 --- a/core/obex/receiver.cpp +++ b/core/obex/receiver.cpp @@ -1,24 +1,27 @@ -#include -#include -#include -#include // int system -#include +#include "obex.h" +#include "receiver.h" +using namespace OpieObex; -#include +/* OPIE */ +#include +#include +#include +#include +using namespace Opie::Core; +/* QT */ #include #include #include #include -#include -#include -#include - -#include "obex.h" -#include "receiver.h" - -using namespace OpieObex; +/* STD */ +#include +#include +#include +#include // int system +#include +#include /* TRANSLATOR OpieObex::Receiver */ @@ -75,14 +78,14 @@ void Receiver::tidyUp( QString& _file, const QString& ending) { (void)::strncat( foo, ending.latin1(), 4 ); _file = QString::fromLatin1( foo ); QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) ); - qWarning("Executing: %s", cmd.latin1() ); + owarn << "Executing: " << cmd << "" << oendl; (void)::system( cmd.latin1() ); cmd = QString("rm %1").arg( Global::shellQuote(file) ); (void)::system( cmd.latin1() ); } int Receiver::checkFile( QString& file ) { - qWarning("check file!! %s", file.latin1() ); + owarn << "check file!! " << file << "" << oendl; int ret; QString ending; @@ -107,7 +110,7 @@ int Receiver::checkFile( QString& file ) { */ tidyUp( file, ending ); - qWarning("check it now %d", ret ); + owarn << "check it now " << ret << "" << oendl; return ret; } @@ -148,7 +151,7 @@ void OtherHandler::handle( const QString& file ) { m_file = file; m_na->setText(file); DocLnk lnk(file); - qWarning(" %s %s", lnk.type().latin1(), lnk.icon().latin1() ); + owarn << " " << lnk.type() << " " << lnk.icon() << "" << oendl; QString str = tr("

You received a file of type %1 ( )What do you want to do?").arg(lnk.type() ).arg(lnk.icon() ); m_view->setText( str ); @@ -191,7 +194,7 @@ QString OtherHandler::targetName( const QString& file ) { /* fast cpy */ void OtherHandler::copy(const QString& src, const QString& file) { - qWarning("src %s, dest %s", src.latin1(),file.latin1() ); + owarn << "src " << src << ", dest " << file << "" << oendl; QString cmd = QString("mv %1 %2").arg( Global::shellQuote( src )). arg( Global::shellQuote( file ) ); ::system( cmd.latin1() ); -- cgit v0.9.0.2