author | mickeyl <mickeyl> | 2004-04-05 12:48:49 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-05 12:48:49 (UTC) |
commit | f1708be741dfb73ceaffb633b44093f2cb2b3d57 (patch) (side-by-side diff) | |
tree | 0bdcab2ac6c5f0e5cac67eb58807a50bb79d82e0 | |
parent | 0b481957a2eebf28b05d9803780d05ad4232aa00 (diff) | |
download | opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.zip opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.gz opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.bz2 |
convert core/applets/* to Opie debug framework
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 20 | ||||
-rw-r--r-- | core/applets/clockapplet/clock.cpp | 4 | ||||
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 4 | ||||
-rw-r--r-- | core/applets/multikeyapplet/multikey.cpp | 2 | ||||
-rw-r--r-- | core/applets/restartapplet/restart.cpp | 2 | ||||
-rw-r--r-- | core/applets/restartapplet/restartappletimpl.cpp | 1 | ||||
-rw-r--r-- | core/applets/rotateapplet/rotate.cpp | 7 | ||||
-rw-r--r-- | core/applets/screenshotapplet/screenshot.cpp | 20 | ||||
-rw-r--r-- | core/applets/vmemo/vmemo.cpp | 34 | ||||
-rw-r--r-- | core/applets/vtapplet/vt.cpp | 25 | ||||
-rw-r--r-- | core/obex/obexsend.cpp | 29 | ||||
-rw-r--r-- | core/obex/receiver.cpp | 41 |
12 files changed, 100 insertions, 89 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 1ad8b55..3a6ad27 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp @@ -19,10 +19,13 @@ #include "cardmon.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/odevice.h> #include <opie2/otaskbarapplet.h> #include <qpe/applnk.h> #include <qpe/resource.h> +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include <qcopchannel_qws.h> @@ -38,18 +41,11 @@ #include <stdlib.h> #include <string.h> #include <fcntl.h> - #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <sys/vfs.h> #include <mntent.h> #endif -using namespace Opie; - -using namespace Opie::Ui; -using namespace Opie::Ui; -using namespace Opie::Core; - CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) { @@ -197,12 +193,12 @@ void CardMonitor::cardMessage( const QCString & msg, const QByteArray & ) { if ( msg == "stabChanged()" ) { - // qDebug("Pcmcia: stabchanged"); + // odebug << "Pcmcia: stabchanged" << oendl; getStatusPcmcia(); } else if ( msg == "mtabChanged()" ) { - // qDebug("CARDMONAPPLET: mtabchanged"); + // odebug << "CARDMONAPPLET: mtabchanged" << oendl; getStatusSd(); } } @@ -331,7 +327,7 @@ bool CardMonitor::getStatusPcmcia( int showPopUp ) else { // no file found - qDebug( "no file found" ); + odebug << "no file found" << oendl; cardInPcmcia0 = FALSE; cardInPcmcia1 = FALSE; } @@ -357,7 +353,7 @@ bool CardMonitor::getStatusSd( int showPopUp ) while ( ( me = getmntent( mntfp ) ) != 0 ) { QString fs = me->mnt_fsname; - //qDebug( fs ); + //odebug << fs << oendl; if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd" || fs.left( 9 ) == "/dev/mmcd" ) { @@ -385,7 +381,7 @@ bool CardMonitor::getStatusSd( int showPopUp ) text += "Ejected: SD/MMC"; what = "off"; } - //qDebug("TEXT: " + text ); + //odebug << "TEXT: " + text << oendl; #ifndef QT_NO_SOUND QSound::play( Resource::findSound( "cardmon/card" + what ) ); #endif diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp index 3b13d74..7d396e7 100644 --- a/core/applets/clockapplet/clock.cpp +++ b/core/applets/clockapplet/clock.cpp @@ -20,12 +20,16 @@ #include "clock.h" +/* OPIE */ +#include <opie2/odebug.h> #include <opie2/otaskbarapplet.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> +using namespace Opie::Core; using namespace Opie::Ui; + LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) { // If you want a sunken border around the clock do this: diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index 2196d18..7122b40 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp @@ -207,7 +207,7 @@ void IrdaApplet::showDiscovered ( ) discoveredDevice = line. mid ( line. find ( ':' ) + 2, line. find ( ',' ) - line. find ( ':' ) - 2 ); deviceAddr = line. mid ( line. find ( "daddr:" ) + 9, 8 ); - // qDebug(discoveredDevice + "(" + deviceAddr + ")"); + // odebug << discoveredDevice + "(" + deviceAddr + ")" << oendl; if ( !m_devices. contains ( deviceAddr )) { popup ( tr( "Found:" ) + " " + discoveredDevice ); @@ -219,7 +219,7 @@ void IrdaApplet::showDiscovered ( ) } for ( it = m_devices. begin ( ); it != m_devices. end ( ); ) { - // qDebug("IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?"); + // odebug << "IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?" << oendl; if ( it. data ( ). left ( 3 ) == "+++" ) { popup ( tr( "Lost:" ) + " " + it. data ( ). mid ( 3 )); diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp index 195ada5..195d8a4 100644 --- a/core/applets/multikeyapplet/multikey.cpp +++ b/core/applets/multikeyapplet/multikey.cpp @@ -68,7 +68,7 @@ void Multikey::mouseReleaseEvent(QMouseEvent *ev) lang = lang < sw_maps.count()-1 ? lang+1 : 0; QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)"); - //qDebug("Lang=%d, count=%d, lab=%s", lang, sw_maps.count(), labels[lang].ascii()); + //odebug << "Lang=" << lang << ", count=" << sw_maps.count() << ", lab=" << labels[lang].ascii() << "" << oendl; e << sw_maps[lang]; setText(labels[lang]); } diff --git a/core/applets/restartapplet/restart.cpp b/core/applets/restartapplet/restart.cpp index 226c2a8..2e17608 100644 --- a/core/applets/restartapplet/restart.cpp +++ b/core/applets/restartapplet/restart.cpp @@ -53,7 +53,6 @@ RestartApplet::RestartApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedHeight( 18 ); setFixedWidth( 16 ); - qDebug("new restartapplet"); show(); } @@ -66,7 +65,6 @@ void RestartApplet::mousePressEvent( QMouseEvent *) { void RestartApplet::paintEvent( QPaintEvent* ) { QPainter p(this); - qDebug("paint RESTART pixmap"); p.drawPixmap( 0, 1, ( const char** ) restart_xpm ); } diff --git a/core/applets/restartapplet/restartappletimpl.cpp b/core/applets/restartapplet/restartappletimpl.cpp index d8e10d3..3adc80c 100644 --- a/core/applets/restartapplet/restartappletimpl.cpp +++ b/core/applets/restartapplet/restartappletimpl.cpp @@ -33,7 +33,6 @@ RestartAppletImpl::~RestartAppletImpl() QWidget *RestartAppletImpl::applet( QWidget *parent ) { - qDebug("restart applet"); if ( !restart ) restart = new RestartApplet( parent ); return restart; diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index f621aa9..f23423d 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp @@ -31,6 +31,7 @@ #include "rotate.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/odevice.h> #include <qpe/config.h> #include <qpe/power.h> @@ -62,7 +63,7 @@ RotateApplet::~RotateApplet ( ) */ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) { - qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg ); + odebug << "RotateApplet::channelReceived( '" << msg << "' )" << oendl; if ( ODevice::inst()->hasHingeSensor() ) { @@ -72,7 +73,7 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data interval.tv_nsec = 600000; ::nanosleep( &interval, &remain ); OHingeStatus status = ODevice::inst()->readHingeSensor(); - qDebug( "RotateApplet::readHingeSensor = %d", (int) status ); + odebug << "RotateApplet::readHingeSensor = " << (int) status << "" << oendl; Config cfg( "apm" ); cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" ); @@ -96,7 +97,7 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data default: /* IGNORE */ break; } } - qDebug( "RotateApplet::switchAction %d performed.", cfg.readNumEntry( "CloseHingeAction", 0 ) ); + odebug << "RotateApplet::switchAction " << cfg.readNumEntry( "CloseHingeAction" ) << " performed." << oendl; } QDataStream stream( data, IO_ReadOnly ); diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp index 9aa012a..938ea0c 100644 --- a/core/applets/screenshotapplet/screenshot.cpp +++ b/core/applets/screenshotapplet/screenshot.cpp @@ -16,9 +16,12 @@ #include "inputDialog.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/otaskbarapplet.h> #include <qpe/qpeapplication.h> #include <qpe/applnk.h> +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include <qlineedit.h> @@ -39,7 +42,6 @@ #include <unistd.h> /* XPM */ -using namespace Opie::Ui; static char * snapshot_xpm[] = { "32 32 177 2", " c None", @@ -362,13 +364,13 @@ void ScreenshotControl::savePixmap() if (fileName.right(3) != "png") fileName = fileName + ".png"; lnk.setFile(fileName); //sets File property - qDebug("saving file " + fileName); + odebug << "saving file " + fileName << oendl; snapshot.save( fileName, "PNG"); QFileInfo fi( fileName); lnk.setName( fi.fileName()); //sets file name if (!lnk.writeLink()) - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } else { @@ -380,7 +382,7 @@ void ScreenshotControl::savePixmap() QString dirName = QDir::homeDirPath() + "/Documents/image/png/"; if ( !QDir( dirName).exists() ) { - qDebug("making dir " + dirName); + odebug << "making dir " + dirName << oendl; QString msg = "mkdir -p " + dirName; system(msg.latin1()); } @@ -388,13 +390,13 @@ void ScreenshotControl::savePixmap() if (fileName.right(3) != "png") fileName = fileName + ".png"; lnk.setFile(fileName); //sets File property - qDebug("saving file " + fileName); + odebug << "saving file " + fileName << oendl; snapshot.save( fileName, "PNG"); QFileInfo fi( fileName); lnk.setName( fi.fileName()); //sets file name if (!lnk.writeLink()) - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } @@ -406,7 +408,7 @@ void ScreenshotControl::performGrab() snapshot = QPixmap::grabWindow( QPEApplication::desktop()->winId(), 0, 0, QApplication::desktop()->width(), QApplication::desktop()->height() ); if (buttonPushed == 1) { - qDebug("grabbing screen"); + odebug << "grabbing screen" << oendl; grabTimer->stop(); show(); qApp->processEvents(); @@ -420,7 +422,7 @@ void ScreenshotControl::performGrab() bool ok = false; QString displayEnv = getenv("QWS_DISPLAY"); - qDebug(displayEnv); + odebug << displayEnv << oendl; if(( displayEnv.left(2) != ":0" ) && (!displayEnv.isEmpty())) { @@ -457,7 +459,7 @@ void ScreenshotControl::performGrab() header = header.arg( SCAP_model).arg( ::getenv( "USER" ) ).arg( img.numBytes() ).arg( SCAP_hostname ); - qDebug(header); + odebug << header << oendl; if ( !pix.isNull() ) { const char *ascii = header.latin1( ); diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 7dd5b4b..622b1df 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -12,6 +12,10 @@ // copyright 2002 Jeremy Cowgar <jc@cowgar.com> // copyright 2002 and 2003 L.J.Potter <ljp@llornkcor.com> +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + extern "C" { #include "adpcm.h" } @@ -207,7 +211,7 @@ VMemo::VMemo( QWidget *parent, const char *_name ) int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0); - qDebug("toggleKey %d", toggleKey); + odebug << "toggleKey " << toggleKey << "" << oendl; if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) systemZaurus=TRUE; else @@ -245,7 +249,7 @@ int VMemo::position() } void VMemo::receive( const QCString &msg, const QByteArray &data ) { - qDebug("receive"); + odebug << "receive" << oendl; QDataStream stream( data, IO_ReadOnly ); if (msg == "toggleRecord()") { @@ -293,7 +297,7 @@ bool VMemo::startRecording() { msgLabel->show(); } - qDebug("Start recording engines"); + odebug << "Start recording engines" << oendl; recording = TRUE; if (openDSP() == -1) { @@ -318,7 +322,7 @@ bool VMemo::startRecording() { s=fileName.find(':'); if(s) fileName=fileName.right(fileName.length()-s-2); - qDebug("pathname will be "+fileName); + odebug << "pathname will be "+fileName << oendl; if( fileName.left(1).find('/') == -1) fileName="/"+fileName; @@ -327,11 +331,11 @@ bool VMemo::startRecording() { fName = "vm_"+ date+ ".wav"; fileName+=fName; - qDebug("filename is "+fileName); + odebug << "filename is "+fileName << oendl; // open tmp file here char *pointer; pointer=tmpnam(NULL); - qDebug("Opening tmp file %s",pointer); + odebug << "Opening tmp file " << pointer << "" << oendl; if(openWAV(pointer ) == -1) { @@ -371,7 +375,7 @@ bool VMemo::startRecording() { void VMemo::stopRecording() { show(); - qDebug("Stopped recording"); + odebug << "Stopped recording" << oendl; recording = FALSE; if(useAlerts) { msgLabel->close(); @@ -399,7 +403,7 @@ int VMemo::openDSP() { resolution = 8; } - qDebug("samplerate: %d, channels %d, resolution %d", speed, channels, resolution); + odebug << "samplerate: " << speed << ", channels " << channels << ", resolution " << resolution << "" << oendl; if(systemZaurus) { dsp = open("/dev/dsp1", O_RDONLY); //Zaurus needs /dev/dsp1 @@ -483,7 +487,7 @@ bool VMemo::record() { int result, value; QString msg; msg.sprintf("Recording format %d", format); - qDebug(msg); + odebug << msg << oendl; Config config("Vmemo"); config.setGroup("Record"); int sRate=config.readNumEntry("SizeLimit", 30); @@ -494,7 +498,7 @@ bool VMemo::record() { // } else { // 16 bit only capabilities msg.sprintf("Recording format other"); - qDebug(msg); + odebug << msg << oendl; int bufsize=1024; int bytesWritten=0; @@ -513,7 +517,7 @@ bool VMemo::record() { result = read(dsp, sound, 1024); // 8192 if( result <= 0) { perror("recording error "); -// qDebug(currentFileName); +// odebug << currentFileName << oendl; QMessageBox::message(tr("Note"),tr("error recording")); recording=FALSE; break; @@ -540,7 +544,7 @@ bool VMemo::record() { break; return FALSE; } - // printf("%d\r",length); + // odebug << "" << length << "\r" << oendl; // fflush(stdout); qApp->processEvents(); } @@ -559,7 +563,7 @@ bool VMemo::record() { write(wav, &length, 4); track.close(); - qDebug("Track closed"); + odebug << "Track closed" << oendl; if( ioctl( dsp, SNDCTL_DSP_RESET,0) == -1) perror("ioctl(\"SNDCTL_DSP_RESET\")"); @@ -583,11 +587,11 @@ bool VMemo::record() { QString time; time.sprintf("%.2f", numberOfRecordedSeconds); cfgO.writeEntry( currentFileName, time ); - // qDebug("writing config numberOfRecordedSeconds "+time); + // odebug << "writing config numberOfRecordedSeconds "+time << oendl; cfgO.write(); - qDebug("done recording "+fileName); + odebug << "done recording "+fileName << oendl; Config cfg("qpe"); cfg.setGroup("Volume"); diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp index bd39093..aec63c3 100644 --- a/core/applets/vtapplet/vt.cpp +++ b/core/applets/vtapplet/vt.cpp @@ -1,7 +1,5 @@ /********************************************************************** -** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. -** -** Contact me @ mickeyl@handhelds.org +** Copyright (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de> ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -13,10 +11,17 @@ ** **********************************************************************/ +#include "vt.h" + +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/resource.h> +using namespace Opie::Core; +/* QT */ #include <qpopupmenu.h> +/* STD */ #include <fcntl.h> #include <unistd.h> #include <sys/types.h> @@ -24,8 +29,6 @@ #include <sys/ioctl.h> #include <linux/vt.h> -#include "vt.h" - VTApplet::VTApplet ( ) : QObject ( 0, "VTApplet" ) { @@ -74,7 +77,7 @@ QIconSet VTApplet::icon ( ) const QPopupMenu *VTApplet::popup ( QWidget* parent ) const { - qDebug( "VTApplet::popup" ); + odebug << "VTApplet::popup" << oendl; struct vt_stat vtstat; int fd = ::open( "/dev/tty0", O_RDWR ); @@ -99,7 +102,7 @@ QPopupMenu *VTApplet::popup ( QWidget* parent ) const void VTApplet::changeVT( int index ) { - //qDebug( "VTApplet::changeVT( %d )", index-500 ); + //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl; int fd = ::open("/dev/tty0", O_RDWR); if ( fd == -1 ) return; @@ -109,7 +112,7 @@ void VTApplet::changeVT( int index ) void VTApplet::updateMenu() { - //qDebug( "VTApplet::updateMenu()" ); + //odebug << "VTApplet::updateMenu()" << oendl; int fd = ::open( "/dev/console", O_RDONLY ); if ( fd == -1 ) return; @@ -120,9 +123,9 @@ void VTApplet::updateMenu() /* if ( result == -1 ) - qDebug( "VT %d disallocated == free", i ); + odebug << "VT " << i << " disallocated == free" << oendl; else - qDebug( "VT %d _not_ disallocated == busy", i ); + odebug << "VT " << i << " _not_ disallocated == busy" << oendl; */ m_subMenu->setItemEnabled( 500+i, result == -1 ); @@ -134,7 +137,7 @@ void VTApplet::updateMenu() void VTApplet::activated() { - qDebug( "VTApplet::activated()" ); + odebug << "VTApplet::activated()" << oendl; } 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 <opie2/odebug.h> +#include <qpe/qcopenvelope_qws.h> +using namespace Opie::Core; + +/* QT */ #include <qpushbutton.h> #include <qlabel.h> #include <qlayout.h> #include <qtimer.h> - -#include <qpe/qcopenvelope_qws.h> - -#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<QString, QString>& 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<int, QString>::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 <sys/types.h> -#include <sys/stat.h> -#include <sys/mman.h> -#include <stdlib.h> // int system -#include <unistd.h> +#include "obex.h" +#include "receiver.h" +using namespace OpieObex; -#include <fcntl.h> +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/applnk.h> +#include <qpe/qpeapplication.h> +#include <qpe/qcopenvelope_qws.h> +using namespace Opie::Core; +/* QT */ #include <qfileinfo.h> #include <qlabel.h> #include <qtextview.h> #include <qpushbutton.h> -#include <qpe/applnk.h> -#include <qpe/qpeapplication.h> -#include <qpe/qcopenvelope_qws.h> - -#include "obex.h" -#include "receiver.h" - -using namespace OpieObex; +/* STD */ +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/mman.h> +#include <stdlib.h> // int system +#include <unistd.h> +#include <fcntl.h> /* 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("<p>You received a file of type %1 (<img src=\"%2\"> )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() ); |