summaryrefslogtreecommitdiff
path: root/core/applets/rotateapplet/rotate.cpp
Side-by-side diff
Diffstat (limited to 'core/applets/rotateapplet/rotate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/rotateapplet/rotate.cpp9
1 files changed, 5 insertions, 4 deletions
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
@@ -28,12 +28,13 @@
Boston, MA 02111-1307, USA.
*/
#include "rotate.h"
/* OPIE */
+#include <opie2/odebug.h>
#include <opie2/odevice.h>
#include <qpe/config.h>
#include <qpe/power.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
using namespace Opie::Core;
@@ -59,23 +60,23 @@ RotateApplet::~RotateApplet ( )
/**
* Qcop receive method.
*/
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() )
{
struct timespec interval;
struct timespec remain;
interval.tv_sec = 0;
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" );
int action = cfg.readNumEntry( "CloseHingeAction", 0 );
if ( status == CASE_CLOSED )
@@ -93,13 +94,13 @@ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data
{
case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 127 ); break;
case 2: /* SUSPEND */ /* How to wake up the device from kernel? */; break;
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 );
if ( msg == "flip()" )
{
activated ( );
@@ -236,13 +237,13 @@ QRESULT RotateApplet::queryInterface( const QUuid &uuid, QUnknownInterface **ifa
*iface = 0;
if ( uuid == IID_QUnknown )
*iface = this;
else if ( uuid == IID_MenuApplet )
*iface = this;
else
- return QS_FALSE;
+ return QS_FALSE;
if ( *iface )
(*iface)->addRef();
return QS_OK;
}