Diffstat (limited to 'core/applets/cardmon/cardmon.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 20 |
1 files changed, 8 insertions, 12 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 @@ -16,16 +16,19 @@ * * ***************************************************************************/ #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> #include <qpainter.h> #include <qfile.h> #include <qtextstream.h> @@ -35,24 +38,17 @@ /* STD */ #include <stdio.h> #include <unistd.h> #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" ) ) { QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); connect( pcmciaChannel, @@ -194,18 +190,18 @@ void CardMonitor::mousePressEvent( QMouseEvent * ) 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(); } } bool CardMonitor::getStatusPcmcia( int showPopUp ) { @@ -328,13 +324,13 @@ bool CardMonitor::getStatusPcmcia( int showPopUp ) } } else { // no file found - qDebug( "no file found" ); + odebug << "no file found" << oendl; cardInPcmcia0 = FALSE; cardInPcmcia1 = FALSE; } repaint( FALSE ); return ( ( cardWas0 == cardInPcmcia0 && cardWas1 == cardInPcmcia1 ) ? FALSE : TRUE ); @@ -354,13 +350,13 @@ bool CardMonitor::getStatusSd( int showPopUp ) if ( mntfp ) { 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" ) { cardInSd = TRUE; show(); } @@ -382,13 +378,13 @@ bool CardMonitor::getStatusSd( int showPopUp ) } else { 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 popUp( text, "cardmon/ide" ); // XX add SD pic } #else |