summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-05 12:48:49 (UTC)
committer mickeyl <mickeyl>2004-04-05 12:48:49 (UTC)
commitf1708be741dfb73ceaffb633b44093f2cb2b3d57 (patch) (unidiff)
tree0bdcab2ac6c5f0e5cac67eb58807a50bb79d82e0
parent0b481957a2eebf28b05d9803780d05ad4232aa00 (diff)
downloadopie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.zip
opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.gz
opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.bz2
convert core/applets/* to Opie debug framework
Diffstat (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
@@ -19,10 +19,13 @@
19#include "cardmon.h" 19#include "cardmon.h"
20 20
21/* OPIE */ 21/* OPIE */
22#include <opie2/odebug.h>
22#include <opie2/odevice.h> 23#include <opie2/odevice.h>
23#include <opie2/otaskbarapplet.h> 24#include <opie2/otaskbarapplet.h>
24#include <qpe/applnk.h> 25#include <qpe/applnk.h>
25#include <qpe/resource.h> 26#include <qpe/resource.h>
27using namespace Opie::Core;
28using namespace Opie::Ui;
26 29
27/* QT */ 30/* QT */
28#include <qcopchannel_qws.h> 31#include <qcopchannel_qws.h>
@@ -38,18 +41,11 @@
38#include <stdlib.h> 41#include <stdlib.h>
39#include <string.h> 42#include <string.h>
40#include <fcntl.h> 43#include <fcntl.h>
41
42#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 44#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
43#include <sys/vfs.h> 45#include <sys/vfs.h>
44#include <mntent.h> 46#include <mntent.h>
45#endif 47#endif
46 48
47using namespace Opie;
48
49using namespace Opie::Ui;
50using namespace Opie::Ui;
51using namespace Opie::Core;
52
53CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), 49CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ),
54 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) 50 pm( Resource::loadPixmap( "cardmon/pcmcia" ) )
55{ 51{
@@ -197,12 +193,12 @@ void CardMonitor::cardMessage( const QCString & msg, const QByteArray & )
197{ 193{
198 if ( msg == "stabChanged()" ) 194 if ( msg == "stabChanged()" )
199 { 195 {
200 // qDebug("Pcmcia: stabchanged"); 196 // odebug << "Pcmcia: stabchanged" << oendl;
201 getStatusPcmcia(); 197 getStatusPcmcia();
202 } 198 }
203 else if ( msg == "mtabChanged()" ) 199 else if ( msg == "mtabChanged()" )
204 { 200 {
205 // qDebug("CARDMONAPPLET: mtabchanged"); 201 // odebug << "CARDMONAPPLET: mtabchanged" << oendl;
206 getStatusSd(); 202 getStatusSd();
207 } 203 }
208} 204}
@@ -331,7 +327,7 @@ bool CardMonitor::getStatusPcmcia( int showPopUp )
331 else 327 else
332 { 328 {
333 // no file found 329 // no file found
334 qDebug( "no file found" ); 330 odebug << "no file found" << oendl;
335 cardInPcmcia0 = FALSE; 331 cardInPcmcia0 = FALSE;
336 cardInPcmcia1 = FALSE; 332 cardInPcmcia1 = FALSE;
337 } 333 }
@@ -357,7 +353,7 @@ bool CardMonitor::getStatusSd( int showPopUp )
357 while ( ( me = getmntent( mntfp ) ) != 0 ) 353 while ( ( me = getmntent( mntfp ) ) != 0 )
358 { 354 {
359 QString fs = me->mnt_fsname; 355 QString fs = me->mnt_fsname;
360 //qDebug( fs ); 356 //odebug << fs << oendl;
361 if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd" 357 if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd"
362 || fs.left( 9 ) == "/dev/mmcd" ) 358 || fs.left( 9 ) == "/dev/mmcd" )
363 { 359 {
@@ -385,7 +381,7 @@ bool CardMonitor::getStatusSd( int showPopUp )
385 text += "Ejected: SD/MMC"; 381 text += "Ejected: SD/MMC";
386 what = "off"; 382 what = "off";
387 } 383 }
388 //qDebug("TEXT: " + text ); 384 //odebug << "TEXT: " + text << oendl;
389#ifndef QT_NO_SOUND 385#ifndef QT_NO_SOUND
390 QSound::play( Resource::findSound( "cardmon/card" + what ) ); 386 QSound::play( Resource::findSound( "cardmon/card" + what ) );
391#endif 387#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 @@
20 20
21#include "clock.h" 21#include "clock.h"
22 22
23/* OPIE */
24#include <opie2/odebug.h>
23#include <opie2/otaskbarapplet.h> 25#include <opie2/otaskbarapplet.h>
24#include <qpe/qpeapplication.h> 26#include <qpe/qpeapplication.h>
25#include <qpe/qcopenvelope_qws.h> 27#include <qpe/qcopenvelope_qws.h>
26#include <qpe/config.h> 28#include <qpe/config.h>
27 29
30using namespace Opie::Core;
28using namespace Opie::Ui; 31using namespace Opie::Ui;
32
29LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) 33LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent )
30{ 34{
31 // If you want a sunken border around the clock do this: 35 // 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 ( )
207 discoveredDevice = line. mid ( line. find ( ':' ) + 2, line. find ( ',' ) - line. find ( ':' ) - 2 ); 207 discoveredDevice = line. mid ( line. find ( ':' ) + 2, line. find ( ',' ) - line. find ( ':' ) - 2 );
208 deviceAddr = line. mid ( line. find ( "daddr:" ) + 9, 8 ); 208 deviceAddr = line. mid ( line. find ( "daddr:" ) + 9, 8 );
209 209
210 // qDebug(discoveredDevice + "(" + deviceAddr + ")"); 210 // odebug << discoveredDevice + "(" + deviceAddr + ")" << oendl;
211 211
212 if ( !m_devices. contains ( deviceAddr )) { 212 if ( !m_devices. contains ( deviceAddr )) {
213 popup ( tr( "Found:" ) + " " + discoveredDevice ); 213 popup ( tr( "Found:" ) + " " + discoveredDevice );
@@ -219,7 +219,7 @@ void IrdaApplet::showDiscovered ( )
219 } 219 }
220 220
221 for ( it = m_devices. begin ( ); it != m_devices. end ( ); ) { 221 for ( it = m_devices. begin ( ); it != m_devices. end ( ); ) {
222 // qDebug("IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?"); 222 // odebug << "IrdaMon: delete " + it.currentKey() + "=" + *devicesAvailable[it.currentKey()] + "?" << oendl;
223 223
224 if ( it. data ( ). left ( 3 ) == "+++" ) { 224 if ( it. data ( ). left ( 3 ) == "+++" ) {
225 popup ( tr( "Lost:" ) + " " + it. data ( ). mid ( 3 )); 225 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)
68 68
69 lang = lang < sw_maps.count()-1 ? lang+1 : 0; 69 lang = lang < sw_maps.count()-1 ? lang+1 : 0;
70 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)"); 70 QCopEnvelope e("MultiKey/Keyboard", "setmultikey(QString)");
71 //qDebug("Lang=%d, count=%d, lab=%s", lang, sw_maps.count(), labels[lang].ascii()); 71 //odebug << "Lang=" << lang << ", count=" << sw_maps.count() << ", lab=" << labels[lang].ascii() << "" << oendl;
72 e << sw_maps[lang]; 72 e << sw_maps[lang];
73 setText(labels[lang]); 73 setText(labels[lang]);
74} 74}
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 )
53 : QWidget( parent, name ) { 53 : QWidget( parent, name ) {
54 setFixedHeight( 18 ); 54 setFixedHeight( 18 );
55 setFixedWidth( 16 ); 55 setFixedWidth( 16 );
56 qDebug("new restartapplet");
57 show(); 56 show();
58} 57}
59 58
@@ -66,7 +65,6 @@ void RestartApplet::mousePressEvent( QMouseEvent *) {
66 65
67void RestartApplet::paintEvent( QPaintEvent* ) { 66void RestartApplet::paintEvent( QPaintEvent* ) {
68 QPainter p(this); 67 QPainter p(this);
69 qDebug("paint RESTART pixmap");
70 p.drawPixmap( 0, 1, ( const char** ) restart_xpm ); 68 p.drawPixmap( 0, 1, ( const char** ) restart_xpm );
71} 69}
72 70
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()
33 33
34QWidget *RestartAppletImpl::applet( QWidget *parent ) 34QWidget *RestartAppletImpl::applet( QWidget *parent )
35{ 35{
36 qDebug("restart applet");
37 if ( !restart ) 36 if ( !restart )
38 restart = new RestartApplet( parent ); 37 restart = new RestartApplet( parent );
39 return restart; 38 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 @@
31#include "rotate.h" 31#include "rotate.h"
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odebug.h>
34#include <opie2/odevice.h> 35#include <opie2/odevice.h>
35#include <qpe/config.h> 36#include <qpe/config.h>
36#include <qpe/power.h> 37#include <qpe/power.h>
@@ -62,7 +63,7 @@ RotateApplet::~RotateApplet ( )
62 */ 63 */
63void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) 64void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data )
64{ 65{
65 qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg ); 66 odebug << "RotateApplet::channelReceived( '" << msg << "' )" << oendl;
66 67
67 if ( ODevice::inst()->hasHingeSensor() ) 68 if ( ODevice::inst()->hasHingeSensor() )
68 { 69 {
@@ -72,7 +73,7 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data
72 interval.tv_nsec = 600000; 73 interval.tv_nsec = 600000;
73 ::nanosleep( &interval, &remain ); 74 ::nanosleep( &interval, &remain );
74 OHingeStatus status = ODevice::inst()->readHingeSensor(); 75 OHingeStatus status = ODevice::inst()->readHingeSensor();
75 qDebug( "RotateApplet::readHingeSensor = %d", (int) status ); 76 odebug << "RotateApplet::readHingeSensor = " << (int) status << "" << oendl;
76 77
77 Config cfg( "apm" ); 78 Config cfg( "apm" );
78 cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" ); 79 cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" );
@@ -96,7 +97,7 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data
96 default: /* IGNORE */ break; 97 default: /* IGNORE */ break;
97 } 98 }
98 } 99 }
99 qDebug( "RotateApplet::switchAction %d performed.", cfg.readNumEntry( "CloseHingeAction", 0 ) ); 100 odebug << "RotateApplet::switchAction " << cfg.readNumEntry( "CloseHingeAction" ) << " performed." << oendl;
100 } 101 }
101 102
102 QDataStream stream( data, IO_ReadOnly ); 103 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 @@
16#include "inputDialog.h" 16#include "inputDialog.h"
17 17
18/* OPIE */ 18/* OPIE */
19#include <opie2/odebug.h>
19#include <opie2/otaskbarapplet.h> 20#include <opie2/otaskbarapplet.h>
20#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
21#include <qpe/applnk.h> 22#include <qpe/applnk.h>
23using namespace Opie::Core;
24using namespace Opie::Ui;
22 25
23/* QT */ 26/* QT */
24#include <qlineedit.h> 27#include <qlineedit.h>
@@ -39,7 +42,6 @@
39#include <unistd.h> 42#include <unistd.h>
40 43
41/* XPM */ 44/* XPM */
42using namespace Opie::Ui;
43static char * snapshot_xpm[] = { 45static char * snapshot_xpm[] = {
44"32 32 177 2", 46"32 32 177 2",
45 " c None", 47 " c None",
@@ -362,13 +364,13 @@ void ScreenshotControl::savePixmap()
362 if (fileName.right(3) != "png") 364 if (fileName.right(3) != "png")
363 fileName = fileName + ".png"; 365 fileName = fileName + ".png";
364 lnk.setFile(fileName); //sets File property 366 lnk.setFile(fileName); //sets File property
365 qDebug("saving file " + fileName); 367 odebug << "saving file " + fileName << oendl;
366 snapshot.save( fileName, "PNG"); 368 snapshot.save( fileName, "PNG");
367 QFileInfo fi( fileName); 369 QFileInfo fi( fileName);
368 lnk.setName( fi.fileName()); //sets file name 370 lnk.setName( fi.fileName()); //sets file name
369 371
370 if (!lnk.writeLink()) 372 if (!lnk.writeLink())
371 qDebug("Writing doclink did not work"); 373 odebug << "Writing doclink did not work" << oendl;
372 } 374 }
373 else { 375 else {
374 376
@@ -380,7 +382,7 @@ void ScreenshotControl::savePixmap()
380 QString dirName = QDir::homeDirPath() + "/Documents/image/png/"; 382 QString dirName = QDir::homeDirPath() + "/Documents/image/png/";
381 383
382 if ( !QDir( dirName).exists() ) { 384 if ( !QDir( dirName).exists() ) {
383 qDebug("making dir " + dirName); 385 odebug << "making dir " + dirName << oendl;
384 QString msg = "mkdir -p " + dirName; 386 QString msg = "mkdir -p " + dirName;
385 system(msg.latin1()); 387 system(msg.latin1());
386 } 388 }
@@ -388,13 +390,13 @@ void ScreenshotControl::savePixmap()
388 if (fileName.right(3) != "png") 390 if (fileName.right(3) != "png")
389 fileName = fileName + ".png"; 391 fileName = fileName + ".png";
390 lnk.setFile(fileName); //sets File property 392 lnk.setFile(fileName); //sets File property
391 qDebug("saving file " + fileName); 393 odebug << "saving file " + fileName << oendl;
392 snapshot.save( fileName, "PNG"); 394 snapshot.save( fileName, "PNG");
393 QFileInfo fi( fileName); 395 QFileInfo fi( fileName);
394 lnk.setName( fi.fileName()); //sets file name 396 lnk.setName( fi.fileName()); //sets file name
395 397
396 if (!lnk.writeLink()) 398 if (!lnk.writeLink())
397 qDebug("Writing doclink did not work"); 399 odebug << "Writing doclink did not work" << oendl;
398 400
399 } 401 }
400 402
@@ -406,7 +408,7 @@ void ScreenshotControl::performGrab()
406 snapshot = QPixmap::grabWindow( QPEApplication::desktop()->winId(), 0, 0, QApplication::desktop()->width(), QApplication::desktop()->height() ); 408 snapshot = QPixmap::grabWindow( QPEApplication::desktop()->winId(), 0, 0, QApplication::desktop()->width(), QApplication::desktop()->height() );
407 409
408 if (buttonPushed == 1) { 410 if (buttonPushed == 1) {
409 qDebug("grabbing screen"); 411 odebug << "grabbing screen" << oendl;
410 grabTimer->stop(); 412 grabTimer->stop();
411 show(); 413 show();
412 qApp->processEvents(); 414 qApp->processEvents();
@@ -420,7 +422,7 @@ void ScreenshotControl::performGrab()
420 bool ok = false; 422 bool ok = false;
421 423
422 QString displayEnv = getenv("QWS_DISPLAY"); 424 QString displayEnv = getenv("QWS_DISPLAY");
423 qDebug(displayEnv); 425 odebug << displayEnv << oendl;
424 426
425 if(( displayEnv.left(2) != ":0" ) && (!displayEnv.isEmpty())) { 427 if(( displayEnv.left(2) != ":0" ) && (!displayEnv.isEmpty())) {
426 428
@@ -457,7 +459,7 @@ void ScreenshotControl::performGrab()
457 459
458 460
459 header = header.arg( SCAP_model).arg( ::getenv( "USER" ) ).arg( img.numBytes() ).arg( SCAP_hostname ); 461 header = header.arg( SCAP_model).arg( ::getenv( "USER" ) ).arg( img.numBytes() ).arg( SCAP_hostname );
460 qDebug(header); 462 odebug << header << oendl;
461 463
462 if ( !pix.isNull() ) { 464 if ( !pix.isNull() ) {
463 const char *ascii = header.latin1( ); 465 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 @@
12// copyright 2002 Jeremy Cowgar <jc@cowgar.com> 12// copyright 2002 Jeremy Cowgar <jc@cowgar.com>
13// copyright 2002 and 2003 L.J.Potter <ljp@llornkcor.com> 13// copyright 2002 and 2003 L.J.Potter <ljp@llornkcor.com>
14 14
15/* OPIE */
16#include <opie2/odebug.h>
17using namespace Opie::Core;
18
15extern "C" { 19extern "C" {
16#include "adpcm.h" 20#include "adpcm.h"
17} 21}
@@ -207,7 +211,7 @@ VMemo::VMemo( QWidget *parent, const char *_name )
207 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); 211 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1));
208 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0); 212 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0);
209 213
210 qDebug("toggleKey %d", toggleKey); 214 odebug << "toggleKey " << toggleKey << "" << oendl;
211 if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) 215 if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ))
212 systemZaurus=TRUE; 216 systemZaurus=TRUE;
213 else 217 else
@@ -245,7 +249,7 @@ int VMemo::position()
245} 249}
246 250
247void VMemo::receive( const QCString &msg, const QByteArray &data ) { 251void VMemo::receive( const QCString &msg, const QByteArray &data ) {
248 qDebug("receive"); 252 odebug << "receive" << oendl;
249 QDataStream stream( data, IO_ReadOnly ); 253 QDataStream stream( data, IO_ReadOnly );
250 254
251 if (msg == "toggleRecord()") { 255 if (msg == "toggleRecord()") {
@@ -293,7 +297,7 @@ bool VMemo::startRecording() {
293 msgLabel->show(); 297 msgLabel->show();
294 } 298 }
295 299
296 qDebug("Start recording engines"); 300 odebug << "Start recording engines" << oendl;
297 recording = TRUE; 301 recording = TRUE;
298 302
299 if (openDSP() == -1) { 303 if (openDSP() == -1) {
@@ -318,7 +322,7 @@ bool VMemo::startRecording() {
318 s=fileName.find(':'); 322 s=fileName.find(':');
319 if(s) 323 if(s)
320 fileName=fileName.right(fileName.length()-s-2); 324 fileName=fileName.right(fileName.length()-s-2);
321 qDebug("pathname will be "+fileName); 325 odebug << "pathname will be "+fileName << oendl;
322 326
323 if( fileName.left(1).find('/') == -1) 327 if( fileName.left(1).find('/') == -1)
324 fileName="/"+fileName; 328 fileName="/"+fileName;
@@ -327,11 +331,11 @@ bool VMemo::startRecording() {
327 fName = "vm_"+ date+ ".wav"; 331 fName = "vm_"+ date+ ".wav";
328 332
329 fileName+=fName; 333 fileName+=fName;
330 qDebug("filename is "+fileName); 334 odebug << "filename is "+fileName << oendl;
331// open tmp file here 335// open tmp file here
332 char *pointer; 336 char *pointer;
333 pointer=tmpnam(NULL); 337 pointer=tmpnam(NULL);
334 qDebug("Opening tmp file %s",pointer); 338 odebug << "Opening tmp file " << pointer << "" << oendl;
335 339
336 if(openWAV(pointer ) == -1) { 340 if(openWAV(pointer ) == -1) {
337 341
@@ -371,7 +375,7 @@ bool VMemo::startRecording() {
371 375
372void VMemo::stopRecording() { 376void VMemo::stopRecording() {
373 show(); 377 show();
374 qDebug("Stopped recording"); 378 odebug << "Stopped recording" << oendl;
375 recording = FALSE; 379 recording = FALSE;
376 if(useAlerts) { 380 if(useAlerts) {
377 msgLabel->close(); 381 msgLabel->close();
@@ -399,7 +403,7 @@ int VMemo::openDSP() {
399 resolution = 8; 403 resolution = 8;
400 } 404 }
401 405
402 qDebug("samplerate: %d, channels %d, resolution %d", speed, channels, resolution); 406 odebug << "samplerate: " << speed << ", channels " << channels << ", resolution " << resolution << "" << oendl;
403 407
404 if(systemZaurus) { 408 if(systemZaurus) {
405 dsp = open("/dev/dsp1", O_RDONLY); //Zaurus needs /dev/dsp1 409 dsp = open("/dev/dsp1", O_RDONLY); //Zaurus needs /dev/dsp1
@@ -483,7 +487,7 @@ bool VMemo::record() {
483 int result, value; 487 int result, value;
484 QString msg; 488 QString msg;
485 msg.sprintf("Recording format %d", format); 489 msg.sprintf("Recording format %d", format);
486 qDebug(msg); 490 odebug << msg << oendl;
487 Config config("Vmemo"); 491 Config config("Vmemo");
488 config.setGroup("Record"); 492 config.setGroup("Record");
489 int sRate=config.readNumEntry("SizeLimit", 30); 493 int sRate=config.readNumEntry("SizeLimit", 30);
@@ -494,7 +498,7 @@ bool VMemo::record() {
494// } else { // 16 bit only capabilities 498// } else { // 16 bit only capabilities
495 499
496 msg.sprintf("Recording format other"); 500 msg.sprintf("Recording format other");
497 qDebug(msg); 501 odebug << msg << oendl;
498 502
499 int bufsize=1024; 503 int bufsize=1024;
500 int bytesWritten=0; 504 int bytesWritten=0;
@@ -513,7 +517,7 @@ bool VMemo::record() {
513 result = read(dsp, sound, 1024); // 8192 517 result = read(dsp, sound, 1024); // 8192
514 if( result <= 0) { 518 if( result <= 0) {
515 perror("recording error "); 519 perror("recording error ");
516// qDebug(currentFileName); 520// odebug << currentFileName << oendl;
517 QMessageBox::message(tr("Note"),tr("error recording")); 521 QMessageBox::message(tr("Note"),tr("error recording"));
518 recording=FALSE; 522 recording=FALSE;
519 break; 523 break;
@@ -540,7 +544,7 @@ bool VMemo::record() {
540 break; 544 break;
541 return FALSE; 545 return FALSE;
542 } 546 }
543 // printf("%d\r",length); 547 // odebug << "" << length << "\r" << oendl;
544 // fflush(stdout); 548 // fflush(stdout);
545 qApp->processEvents(); 549 qApp->processEvents();
546 } 550 }
@@ -559,7 +563,7 @@ bool VMemo::record() {
559 write(wav, &length, 4); 563 write(wav, &length, 4);
560 564
561 track.close(); 565 track.close();
562 qDebug("Track closed"); 566 odebug << "Track closed" << oendl;
563 567
564 if( ioctl( dsp, SNDCTL_DSP_RESET,0) == -1) 568 if( ioctl( dsp, SNDCTL_DSP_RESET,0) == -1)
565 perror("ioctl(\"SNDCTL_DSP_RESET\")"); 569 perror("ioctl(\"SNDCTL_DSP_RESET\")");
@@ -583,11 +587,11 @@ bool VMemo::record() {
583 QString time; 587 QString time;
584 time.sprintf("%.2f", numberOfRecordedSeconds); 588 time.sprintf("%.2f", numberOfRecordedSeconds);
585 cfgO.writeEntry( currentFileName, time ); 589 cfgO.writeEntry( currentFileName, time );
586 // qDebug("writing config numberOfRecordedSeconds "+time); 590 // odebug << "writing config numberOfRecordedSeconds "+time << oendl;
587 591
588 cfgO.write(); 592 cfgO.write();
589 593
590 qDebug("done recording "+fileName); 594 odebug << "done recording "+fileName << oendl;
591 595
592 Config cfg("qpe"); 596 Config cfg("qpe");
593 cfg.setGroup("Volume"); 597 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 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de>
3**
4** Contact me @ mickeyl@handhelds.org
5** 3**
6** This file may be distributed and/or modified under the terms of the 4** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 5** GNU General Public License version 2 as published by the Free Software
@@ -13,10 +11,17 @@
13** 11**
14**********************************************************************/ 12**********************************************************************/
15 13
14#include "vt.h"
15
16/* OPIE */
17#include <opie2/odebug.h>
16#include <qpe/resource.h> 18#include <qpe/resource.h>
19using namespace Opie::Core;
17 20
21/* QT */
18#include <qpopupmenu.h> 22#include <qpopupmenu.h>
19 23
24/* STD */
20#include <fcntl.h> 25#include <fcntl.h>
21#include <unistd.h> 26#include <unistd.h>
22#include <sys/types.h> 27#include <sys/types.h>
@@ -24,8 +29,6 @@
24#include <sys/ioctl.h> 29#include <sys/ioctl.h>
25#include <linux/vt.h> 30#include <linux/vt.h>
26 31
27#include "vt.h"
28
29VTApplet::VTApplet ( ) 32VTApplet::VTApplet ( )
30 : QObject ( 0, "VTApplet" ) 33 : QObject ( 0, "VTApplet" )
31{ 34{
@@ -74,7 +77,7 @@ QIconSet VTApplet::icon ( ) const
74 77
75QPopupMenu *VTApplet::popup ( QWidget* parent ) const 78QPopupMenu *VTApplet::popup ( QWidget* parent ) const
76{ 79{
77 qDebug( "VTApplet::popup" ); 80 odebug << "VTApplet::popup" << oendl;
78 81
79 struct vt_stat vtstat; 82 struct vt_stat vtstat;
80 int fd = ::open( "/dev/tty0", O_RDWR ); 83 int fd = ::open( "/dev/tty0", O_RDWR );
@@ -99,7 +102,7 @@ QPopupMenu *VTApplet::popup ( QWidget* parent ) const
99 102
100void VTApplet::changeVT( int index ) 103void VTApplet::changeVT( int index )
101{ 104{
102 //qDebug( "VTApplet::changeVT( %d )", index-500 ); 105 //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl;
103 106
104 int fd = ::open("/dev/tty0", O_RDWR); 107 int fd = ::open("/dev/tty0", O_RDWR);
105 if ( fd == -1 ) return; 108 if ( fd == -1 ) return;
@@ -109,7 +112,7 @@ void VTApplet::changeVT( int index )
109 112
110void VTApplet::updateMenu() 113void VTApplet::updateMenu()
111{ 114{
112 //qDebug( "VTApplet::updateMenu()" ); 115 //odebug << "VTApplet::updateMenu()" << oendl;
113 116
114 int fd = ::open( "/dev/console", O_RDONLY ); 117 int fd = ::open( "/dev/console", O_RDONLY );
115 if ( fd == -1 ) return; 118 if ( fd == -1 ) return;
@@ -120,9 +123,9 @@ void VTApplet::updateMenu()
120 123
121 /* 124 /*
122 if ( result == -1 ) 125 if ( result == -1 )
123 qDebug( "VT %d disallocated == free", i ); 126 odebug << "VT " << i << " disallocated == free" << oendl;
124 else 127 else
125 qDebug( "VT %d _not_ disallocated == busy", i ); 128 odebug << "VT " << i << " _not_ disallocated == busy" << oendl;
126 */ 129 */
127 130
128 m_subMenu->setItemEnabled( 500+i, result == -1 ); 131 m_subMenu->setItemEnabled( 500+i, result == -1 );
@@ -134,7 +137,7 @@ void VTApplet::updateMenu()
134 137
135void VTApplet::activated() 138void VTApplet::activated()
136{ 139{
137 qDebug( "VTApplet::activated()" ); 140 odebug << "VTApplet::activated()" << oendl;
138} 141}
139 142
140 143
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 @@
1#include "obex.h"
2#include "obexsend.h"
3using namespace OpieObex;
4
5/* OPIE */
6#include <opie2/odebug.h>
7#include <qpe/qcopenvelope_qws.h>
8using namespace Opie::Core;
9
10/* QT */
1#include <qpushbutton.h> 11#include <qpushbutton.h>
2#include <qlabel.h> 12#include <qlabel.h>
3#include <qlayout.h> 13#include <qlayout.h>
4#include <qtimer.h> 14#include <qtimer.h>
5 15
6
7#include <qpe/qcopenvelope_qws.h>
8
9#include "obex.h"
10#include "obexsend.h"
11
12using namespace OpieObex;
13
14/* TRANSLATOR OpieObex::SendWidget */ 16/* TRANSLATOR OpieObex::SendWidget */
15 17
16
17SendWidget::SendWidget( QWidget* parent, const char* name ) 18SendWidget::SendWidget( QWidget* parent, const char* name )
18 : QWidget( parent, name ) { 19 : QWidget( parent, name ) {
19 initUI(); 20 initUI();
@@ -104,7 +105,7 @@ void SendWidget::send( const QString& file, const QString& desc ) {
104 } 105 }
105} 106}
106void SendWidget::slotIrDaDevices( const QStringList& list) { 107void SendWidget::slotIrDaDevices( const QStringList& list) {
107 qWarning("slot it irda devices "); 108 owarn << "slot it irda devices " << oendl;
108 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { 109 for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
109 int id = m_devBox->addDevice( (*it), DeviceBox::IrDa, tr("Scheduling for beam.") ); 110 int id = m_devBox->addDevice( (*it), DeviceBox::IrDa, tr("Scheduling for beam.") );
110 m_irDa.insert( id, (*it) ); 111 m_irDa.insert( id, (*it) );
@@ -123,7 +124,7 @@ void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) {
123 m_devBox->removeDevice( m_btDeSearch ); 124 m_devBox->removeDevice( m_btDeSearch );
124} 125}
125void SendWidget::slotSelectedDevice( int name, int dev ) { 126void SendWidget::slotSelectedDevice( int name, int dev ) {
126 qWarning("Start beam? %d %d", name, dev ); 127 owarn << "Start beam? " << name << " " << dev << "" << oendl;
127 if ( name == m_irDeSearch ) { 128 if ( name == m_irDeSearch ) {
128 for (QMap<int, QString>::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it ) 129 for (QMap<int, QString>::Iterator it= m_irDa.begin(); it != m_irDa.end(); ++it )
129 m_devBox->removeDevice( it.key() ); 130 m_devBox->removeDevice( it.key() );
@@ -132,7 +133,7 @@ void SendWidget::slotSelectedDevice( int name, int dev ) {
132 } 133 }
133} 134}
134void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) { 135void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) {
135 qWarning("dispatch irda %s", str.data() ); 136 owarn << "dispatch irda " << str.data() << "" << oendl;
136 if ( str == "devices(QStringList)" ) { 137 if ( str == "devices(QStringList)" ) {
137 QDataStream stream( ar, IO_ReadOnly ); 138 QDataStream stream( ar, IO_ReadOnly );
138 QStringList list; 139 QStringList list;
@@ -147,7 +148,7 @@ void SendWidget::slotIrError( int ) {
147 148
148} 149}
149void SendWidget::slotIrSent( bool b) { 150void SendWidget::slotIrSent( bool b) {
150 qWarning("irda sent!!"); 151 owarn << "irda sent!!" << oendl;
151 QString text = b ? tr("Sent") : tr("Failure"); 152 QString text = b ? tr("Sent") : tr("Failure");
152 m_devBox->setStatus( m_irDaIt.key(), text ); 153 m_devBox->setStatus( m_irDaIt.key(), text );
153 ++m_irDaIt; 154 ++m_irDaIt;
@@ -204,7 +205,7 @@ void DeviceBox::setStatus( int id, const QString& status ) {
204 setText( allText() ); 205 setText( allText() );
205} 206}
206void DeviceBox::setSource( const QString& str ) { 207void DeviceBox::setSource( const QString& str ) {
207 qWarning("SetSource:%d", str.toInt() ); 208 owarn << "SetSource:" << str.toInt() << "" << oendl;
208 int id = str.toInt(); 209 int id = str.toInt();
209 emit selectedDevice( id, m_dev[id].device() ); 210 emit selectedDevice( id, m_dev[id].device() );
210} 211}
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 @@
1#include <sys/types.h> 1#include "obex.h"
2#include <sys/stat.h> 2#include "receiver.h"
3#include <sys/mman.h> 3using namespace OpieObex;
4#include <stdlib.h> // int system
5#include <unistd.h>
6 4
7#include <fcntl.h> 5/* OPIE */
6#include <opie2/odebug.h>
7#include <qpe/applnk.h>
8#include <qpe/qpeapplication.h>
9#include <qpe/qcopenvelope_qws.h>
10using namespace Opie::Core;
8 11
12/* QT */
9#include <qfileinfo.h> 13#include <qfileinfo.h>
10#include <qlabel.h> 14#include <qlabel.h>
11#include <qtextview.h> 15#include <qtextview.h>
12#include <qpushbutton.h> 16#include <qpushbutton.h>
13 17
14#include <qpe/applnk.h> 18/* STD */
15#include <qpe/qpeapplication.h> 19#include <sys/types.h>
16#include <qpe/qcopenvelope_qws.h> 20#include <sys/stat.h>
17 21#include <sys/mman.h>
18#include "obex.h" 22#include <stdlib.h> // int system
19#include "receiver.h" 23#include <unistd.h>
20 24#include <fcntl.h>
21using namespace OpieObex;
22 25
23/* TRANSLATOR OpieObex::Receiver */ 26/* TRANSLATOR OpieObex::Receiver */
24 27
@@ -75,14 +78,14 @@ void Receiver::tidyUp( QString& _file, const QString& ending) {
75 (void)::strncat( foo, ending.latin1(), 4 ); 78 (void)::strncat( foo, ending.latin1(), 4 );
76 _file = QString::fromLatin1( foo ); 79 _file = QString::fromLatin1( foo );
77 QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) ); 80 QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) );
78 qWarning("Executing: %s", cmd.latin1() ); 81 owarn << "Executing: " << cmd << "" << oendl;
79 (void)::system( cmd.latin1() ); 82 (void)::system( cmd.latin1() );
80 83
81 cmd = QString("rm %1").arg( Global::shellQuote(file) ); 84 cmd = QString("rm %1").arg( Global::shellQuote(file) );
82 (void)::system( cmd.latin1() ); 85 (void)::system( cmd.latin1() );
83} 86}
84int Receiver::checkFile( QString& file ) { 87int Receiver::checkFile( QString& file ) {
85 qWarning("check file!! %s", file.latin1() ); 88 owarn << "check file!! " << file << "" << oendl;
86 int ret; 89 int ret;
87 QString ending; 90 QString ending;
88 91
@@ -107,7 +110,7 @@ int Receiver::checkFile( QString& file ) {
107 */ 110 */
108 tidyUp( file, ending ); 111 tidyUp( file, ending );
109 112
110 qWarning("check it now %d", ret ); 113 owarn << "check it now " << ret << "" << oendl;
111 return ret; 114 return ret;
112} 115}
113 116
@@ -148,7 +151,7 @@ void OtherHandler::handle( const QString& file ) {
148 m_file = file; 151 m_file = file;
149 m_na->setText(file); 152 m_na->setText(file);
150 DocLnk lnk(file); 153 DocLnk lnk(file);
151 qWarning(" %s %s", lnk.type().latin1(), lnk.icon().latin1() ); 154 owarn << " " << lnk.type() << " " << lnk.icon() << "" << oendl;
152 155
153 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() ); 156 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() );
154 m_view->setText( str ); 157 m_view->setText( str );
@@ -191,7 +194,7 @@ QString OtherHandler::targetName( const QString& file ) {
191 194
192/* fast cpy */ 195/* fast cpy */
193void OtherHandler::copy(const QString& src, const QString& file) { 196void OtherHandler::copy(const QString& src, const QString& file) {
194 qWarning("src %s, dest %s", src.latin1(),file.latin1() ); 197 owarn << "src " << src << ", dest " << file << "" << oendl;
195 QString cmd = QString("mv %1 %2").arg( Global::shellQuote( src )). 198 QString cmd = QString("mv %1 %2").arg( Global::shellQuote( src )).
196 arg( Global::shellQuote( file ) ); 199 arg( Global::shellQuote( file ) );
197 ::system( cmd.latin1() ); 200 ::system( cmd.latin1() );