summaryrefslogtreecommitdiff
path: root/core
authormickeyl <mickeyl>2004-04-05 12:48:49 (UTC)
committer mickeyl <mickeyl>2004-04-05 12:48:49 (UTC)
commitf1708be741dfb73ceaffb633b44093f2cb2b3d57 (patch) (side-by-side diff)
tree0bdcab2ac6c5f0e5cac67eb58807a50bb79d82e0 /core
parent0b481957a2eebf28b05d9803780d05ad4232aa00 (diff)
downloadopie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.zip
opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.gz
opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.bz2
convert core/applets/* to Opie debug framework
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/applets/cardmon/cardmon.cpp20
-rw-r--r--core/applets/clockapplet/clock.cpp4
-rw-r--r--core/applets/irdaapplet/irda.cpp4
-rw-r--r--core/applets/multikeyapplet/multikey.cpp2
-rw-r--r--core/applets/restartapplet/restart.cpp2
-rw-r--r--core/applets/restartapplet/restartappletimpl.cpp1
-rw-r--r--core/applets/rotateapplet/rotate.cpp7
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp20
-rw-r--r--core/applets/vmemo/vmemo.cpp34
-rw-r--r--core/applets/vtapplet/vt.cpp25
-rw-r--r--core/obex/obexsend.cpp29
-rw-r--r--core/obex/receiver.cpp41
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
@@ -21,2 +21,3 @@
/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/odevice.h>
@@ -25,2 +26,4 @@
#include <qpe/resource.h>
+using namespace Opie::Core;
+using namespace Opie::Ui;
@@ -40,3 +43,2 @@
#include <fcntl.h>
-
#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
@@ -46,8 +48,2 @@
-using namespace Opie;
-
-using namespace Opie::Ui;
-using namespace Opie::Ui;
-using namespace Opie::Core;
-
CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ),
@@ -199,3 +195,3 @@ void CardMonitor::cardMessage( const QCString & msg, const QByteArray & )
{
- // qDebug("Pcmcia: stabchanged");
+ // odebug << "Pcmcia: stabchanged" << oendl;
getStatusPcmcia();
@@ -204,3 +200,3 @@ void CardMonitor::cardMessage( const QCString & msg, const QByteArray & )
{
- // qDebug("CARDMONAPPLET: mtabchanged");
+ // odebug << "CARDMONAPPLET: mtabchanged" << oendl;
getStatusSd();
@@ -333,3 +329,3 @@ bool CardMonitor::getStatusPcmcia( int showPopUp )
// no file found
- qDebug( "no file found" );
+ odebug << "no file found" << oendl;
cardInPcmcia0 = FALSE;
@@ -359,3 +355,3 @@ bool CardMonitor::getStatusSd( int showPopUp )
QString fs = me->mnt_fsname;
- //qDebug( fs );
+ //odebug << fs << oendl;
if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd"
@@ -387,3 +383,3 @@ bool CardMonitor::getStatusSd( int showPopUp )
}
- //qDebug("TEXT: " + text );
+ //odebug << "TEXT: " + text << oendl;
#ifndef QT_NO_SOUND
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
@@ -22,2 +22,4 @@
+/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/otaskbarapplet.h>
@@ -27,3 +29,5 @@
+using namespace Opie::Core;
using namespace Opie::Ui;
+
LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent )
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
@@ -209,3 +209,3 @@ void IrdaApplet::showDiscovered ( )
- // qDebug(discoveredDevice + "(" + deviceAddr + ")");
+ // odebug << discoveredDevice + "(" + deviceAddr + ")" << oendl;
@@ -221,3 +221,3 @@ 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;
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
@@ -70,3 +70,3 @@ void Multikey::mouseReleaseEvent(QMouseEvent *ev)
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];
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
@@ -55,3 +55,2 @@ RestartApplet::RestartApplet( QWidget *parent, const char *name )
setFixedWidth( 16 );
- qDebug("new restartapplet");
show();
@@ -68,3 +67,2 @@ 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
@@ -35,3 +35,2 @@ QWidget *RestartAppletImpl::applet( QWidget *parent )
{
- qDebug("restart applet");
if ( !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
@@ -33,2 +33,3 @@
/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/odevice.h>
@@ -64,3 +65,3 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data
{
- qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg );
+ odebug << "RotateApplet::channelReceived( '" << msg << "' )" << oendl;
@@ -74,3 +75,3 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data
OHingeStatus status = ODevice::inst()->readHingeSensor();
- qDebug( "RotateApplet::readHingeSensor = %d", (int) status );
+ odebug << "RotateApplet::readHingeSensor = " << (int) status << "" << oendl;
@@ -98,3 +99,3 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data
}
- qDebug( "RotateApplet::switchAction %d performed.", cfg.readNumEntry( "CloseHingeAction", 0 ) );
+ odebug << "RotateApplet::switchAction " << cfg.readNumEntry( "CloseHingeAction" ) << " performed." << oendl;
}
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
@@ -18,2 +18,3 @@
/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/otaskbarapplet.h>
@@ -21,2 +22,4 @@
#include <qpe/applnk.h>
+using namespace Opie::Core;
+using namespace Opie::Ui;
@@ -41,3 +44,2 @@
/* XPM */
-using namespace Opie::Ui;
static char * snapshot_xpm[] = {
@@ -364,3 +366,3 @@ void ScreenshotControl::savePixmap()
lnk.setFile(fileName); //sets File property
- qDebug("saving file " + fileName);
+ odebug << "saving file " + fileName << oendl;
snapshot.save( fileName, "PNG");
@@ -370,3 +372,3 @@ void ScreenshotControl::savePixmap()
if (!lnk.writeLink())
- qDebug("Writing doclink did not work");
+ odebug << "Writing doclink did not work" << oendl;
}
@@ -382,3 +384,3 @@ void ScreenshotControl::savePixmap()
if ( !QDir( dirName).exists() ) {
- qDebug("making dir " + dirName);
+ odebug << "making dir " + dirName << oendl;
QString msg = "mkdir -p " + dirName;
@@ -390,3 +392,3 @@ void ScreenshotControl::savePixmap()
lnk.setFile(fileName); //sets File property
- qDebug("saving file " + fileName);
+ odebug << "saving file " + fileName << oendl;
snapshot.save( fileName, "PNG");
@@ -396,3 +398,3 @@ void ScreenshotControl::savePixmap()
if (!lnk.writeLink())
- qDebug("Writing doclink did not work");
+ odebug << "Writing doclink did not work" << oendl;
@@ -408,3 +410,3 @@ void ScreenshotControl::performGrab()
if (buttonPushed == 1) {
- qDebug("grabbing screen");
+ odebug << "grabbing screen" << oendl;
grabTimer->stop();
@@ -422,3 +424,3 @@ void ScreenshotControl::performGrab()
QString displayEnv = getenv("QWS_DISPLAY");
- qDebug(displayEnv);
+ odebug << displayEnv << oendl;
@@ -459,3 +461,3 @@ void ScreenshotControl::performGrab()
header = header.arg( SCAP_model).arg( ::getenv( "USER" ) ).arg( img.numBytes() ).arg( SCAP_hostname );
- qDebug(header);
+ odebug << header << oendl;
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
@@ -14,2 +14,6 @@
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
extern "C" {
@@ -209,3 +213,3 @@ VMemo::VMemo( QWidget *parent, const char *_name )
- qDebug("toggleKey %d", toggleKey);
+ odebug << "toggleKey " << toggleKey << "" << oendl;
if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ))
@@ -247,3 +251,3 @@ int VMemo::position()
void VMemo::receive( const QCString &msg, const QByteArray &data ) {
- qDebug("receive");
+ odebug << "receive" << oendl;
QDataStream stream( data, IO_ReadOnly );
@@ -295,3 +299,3 @@ bool VMemo::startRecording() {
- qDebug("Start recording engines");
+ odebug << "Start recording engines" << oendl;
recording = TRUE;
@@ -320,3 +324,3 @@ bool VMemo::startRecording() {
fileName=fileName.right(fileName.length()-s-2);
- qDebug("pathname will be "+fileName);
+ odebug << "pathname will be "+fileName << oendl;
@@ -329,3 +333,3 @@ bool VMemo::startRecording() {
fileName+=fName;
- qDebug("filename is "+fileName);
+ odebug << "filename is "+fileName << oendl;
// open tmp file here
@@ -333,3 +337,3 @@ bool VMemo::startRecording() {
pointer=tmpnam(NULL);
- qDebug("Opening tmp file %s",pointer);
+ odebug << "Opening tmp file " << pointer << "" << oendl;
@@ -373,3 +377,3 @@ void VMemo::stopRecording() {
show();
- qDebug("Stopped recording");
+ odebug << "Stopped recording" << oendl;
recording = FALSE;
@@ -401,3 +405,3 @@ int VMemo::openDSP() {
- qDebug("samplerate: %d, channels %d, resolution %d", speed, channels, resolution);
+ odebug << "samplerate: " << speed << ", channels " << channels << ", resolution " << resolution << "" << oendl;
@@ -485,3 +489,3 @@ bool VMemo::record() {
msg.sprintf("Recording format %d", format);
- qDebug(msg);
+ odebug << msg << oendl;
Config config("Vmemo");
@@ -496,3 +500,3 @@ bool VMemo::record() {
msg.sprintf("Recording format other");
- qDebug(msg);
+ odebug << msg << oendl;
@@ -515,3 +519,3 @@ bool VMemo::record() {
perror("recording error ");
-// qDebug(currentFileName);
+// odebug << currentFileName << oendl;
QMessageBox::message(tr("Note"),tr("error recording"));
@@ -542,3 +546,3 @@ bool VMemo::record() {
}
- // printf("%d\r",length);
+ // odebug << "" << length << "\r" << oendl;
// fflush(stdout);
@@ -561,3 +565,3 @@ bool VMemo::record() {
track.close();
- qDebug("Track closed");
+ odebug << "Track closed" << oendl;
@@ -585,3 +589,3 @@ bool VMemo::record() {
cfgO.writeEntry( currentFileName, time );
- // qDebug("writing config numberOfRecordedSeconds "+time);
+ // odebug << "writing config numberOfRecordedSeconds "+time << oendl;
@@ -589,3 +593,3 @@ bool VMemo::record() {
- qDebug("done recording "+fileName);
+ odebug << "done recording "+fileName << oendl;
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,5 +1,3 @@
/**********************************************************************
-** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved.
-**
-** Contact me @ mickeyl@handhelds.org
+** Copyright (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de>
**
@@ -15,6 +13,13 @@
+#include "vt.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <qpe/resource.h>
+using namespace Opie::Core;
+/* QT */
#include <qpopupmenu.h>
+/* STD */
#include <fcntl.h>
@@ -26,4 +31,2 @@
-#include "vt.h"
-
VTApplet::VTApplet ( )
@@ -76,3 +79,3 @@ QPopupMenu *VTApplet::popup ( QWidget* parent ) const
{
- qDebug( "VTApplet::popup" );
+ odebug << "VTApplet::popup" << oendl;
@@ -101,3 +104,3 @@ void VTApplet::changeVT( int index )
{
- //qDebug( "VTApplet::changeVT( %d )", index-500 );
+ //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl;
@@ -111,3 +114,3 @@ void VTApplet::updateMenu()
{
- //qDebug( "VTApplet::updateMenu()" );
+ //odebug << "VTApplet::updateMenu()" << oendl;
@@ -122,5 +125,5 @@ 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;
*/
@@ -136,3 +139,3 @@ 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 +1,11 @@
+#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>
@@ -5,13 +15,4 @@
-
-#include <qpe/qcopenvelope_qws.h>
-
-#include "obex.h"
-#include "obexsend.h"
-
-using namespace OpieObex;
-
/* TRANSLATOR OpieObex::SendWidget */
-
SendWidget::SendWidget( QWidget* parent, const char* name )
@@ -106,3 +107,3 @@ 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 ) {
@@ -125,3 +126,3 @@ void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) {
void SendWidget::slotSelectedDevice( int name, int dev ) {
- qWarning("Start beam? %d %d", name, dev );
+ owarn << "Start beam? " << name << " " << dev << "" << oendl;
if ( name == m_irDeSearch ) {
@@ -134,3 +135,3 @@ 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)" ) {
@@ -149,3 +150,3 @@ void SendWidget::slotIrError( int ) {
void SendWidget::slotIrSent( bool b) {
- qWarning("irda sent!!");
+ owarn << "irda sent!!" << oendl;
QString text = b ? tr("Sent") : tr("Failure");
@@ -206,3 +207,3 @@ void DeviceBox::setStatus( int id, const QString& status ) {
void DeviceBox::setSource( const QString& str ) {
- qWarning("SetSource:%d", str.toInt() );
+ owarn << "SetSource:" << str.toInt() << "" << oendl;
int id = str.toInt();
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,9 +1,13 @@
-#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>
@@ -13,10 +17,9 @@
-#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>
@@ -77,3 +80,3 @@ void Receiver::tidyUp( QString& _file, const QString& ending) {
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() );
@@ -84,3 +87,3 @@ void Receiver::tidyUp( QString& _file, const QString& ending) {
int Receiver::checkFile( QString& file ) {
- qWarning("check file!! %s", file.latin1() );
+ owarn << "check file!! " << file << "" << oendl;
int ret;
@@ -109,3 +112,3 @@ int Receiver::checkFile( QString& file ) {
- qWarning("check it now %d", ret );
+ owarn << "check it now " << ret << "" << oendl;
return ret;
@@ -150,3 +153,3 @@ void OtherHandler::handle( const QString& file ) {
DocLnk lnk(file);
- qWarning(" %s %s", lnk.type().latin1(), lnk.icon().latin1() );
+ owarn << " " << lnk.type() << " " << lnk.icon() << "" << oendl;
@@ -193,3 +196,3 @@ QString OtherHandler::targetName( const QString& file ) {
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 )).