summaryrefslogtreecommitdiff
authorschurig <schurig>2004-09-10 11:59:05 (UTC)
committer schurig <schurig>2004-09-10 11:59:05 (UTC)
commited70ec4945c7816ec6e899207ec8b99e20e10da5 (patch) (unidiff)
tree1b0a8adab9c7398a799f628297ed9d45a591008f
parent501c17ed2bb97f2062cb11daddeb698a6a9f2828 (diff)
downloadopie-ed70ec4945c7816ec6e899207ec8b99e20e10da5.zip
opie-ed70ec4945c7816ec6e899207ec8b99e20e10da5.tar.gz
opie-ed70ec4945c7816ec6e899207ec8b99e20e10da5.tar.bz2
removed some warnings
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 013f804..21070bf 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1097,17 +1097,17 @@ void Yopy::initButtons ( )
1097bool Yopy::suspend() 1097bool Yopy::suspend()
1098{ 1098{
1099 /* Opie for Yopy does not implement its own power management at the 1099 /* Opie for Yopy does not implement its own power management at the
1100 moment. The public version runs parallel to X, and relies on the 1100 moment. The public version runs parallel to X, and relies on the
1101 existing power management features. */ 1101 existing power management features. */
1102 return false; 1102 return false;
1103} 1103}
1104 1104
1105bool Yopy::setDisplayBrightness(int bright) 1105bool Yopy::setDisplayBrightness(int /*bright*/)
1106{ 1106{
1107 /* The code here works, but is disabled as the current version runs 1107 /* The code here works, but is disabled as the current version runs
1108 parallel to X, and relies on the existing backlight demon. */ 1108 parallel to X, and relies on the existing backlight demon. */
1109#if 0 1109#if 0
1110 if ( QFile::exists("/proc/sys/pm/light") ) { 1110 if ( QFile::exists("/proc/sys/pm/light") ) {
1111 int fd = ::open("/proc/sys/pm/light", O_WRONLY); 1111 int fd = ::open("/proc/sys/pm/light", O_WRONLY);
1112 if (fd >= 0 ) { 1112 if (fd >= 0 ) {
1113 if (bright) 1113 if (bright)
@@ -1663,17 +1663,16 @@ void Zaurus::init ( )
1663 } else if ( model == "Sharp-Collie" || model == "Collie" ) { 1663 } else if ( model == "Sharp-Collie" || model == "Collie" ) {
1664 d-> m_model = Model_Zaurus_SL5500; 1664 d-> m_model = Model_Zaurus_SL5500;
1665 d-> m_modelstr = "Zaurus SL-5500 or SL-5000d"; 1665 d-> m_modelstr = "Zaurus SL-5500 or SL-5000d";
1666 } else { 1666 } else {
1667 d-> m_model = Model_Zaurus_SL5500; 1667 d-> m_model = Model_Zaurus_SL5500;
1668 d-> m_modelstr = "Zaurus (Model unknown)"; 1668 d-> m_modelstr = "Zaurus (Model unknown)";
1669 } 1669 }
1670 1670
1671 bool flipstate = false;
1672 switch ( d-> m_model ) { 1671 switch ( d-> m_model ) {
1673 case Model_Zaurus_SLA300: 1672 case Model_Zaurus_SLA300:
1674 d-> m_rotation = Rot0; 1673 d-> m_rotation = Rot0;
1675 break; 1674 break;
1676 case Model_Zaurus_SLC7x0: 1675 case Model_Zaurus_SLC7x0:
1677 d-> m_rotation = rotation(); 1676 d-> m_rotation = rotation();
1678 d-> m_direction = direction(); 1677 d-> m_direction = direction();
1679 break; 1678 break;
@@ -2362,17 +2361,17 @@ bool SIMpad::setLedState ( OLed l, OLedState st )
2362 return true; 2361 return true;
2363 } 2362 }
2364 } 2363 }
2365 } 2364 }
2366 return false; 2365 return false;
2367} 2366}
2368 2367
2369 2368
2370bool SIMpad::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) 2369bool SIMpad::filter ( int /*unicode*/, int /*keycode*/, int /*modifiers*/, bool /*isPress*/, bool /*autoRepeat*/ )
2371{ 2370{
2372 //TODO 2371 //TODO
2373 return false; 2372 return false;
2374} 2373}
2375 2374
2376void SIMpad::timerEvent ( QTimerEvent * ) 2375void SIMpad::timerEvent ( QTimerEvent * )
2377{ 2376{
2378 killTimer ( m_power_timer ); 2377 killTimer ( m_power_timer );
@@ -2423,17 +2422,17 @@ void SIMpad::alarmSound ( )
2423bool SIMpad::suspend ( ) // Must override because SIMpad does NOT have apm 2422bool SIMpad::suspend ( ) // Must override because SIMpad does NOT have apm
2424{ 2423{
2425 qDebug( "ODevice for SIMpad: suspend()" ); 2424 qDebug( "ODevice for SIMpad: suspend()" );
2426 if ( !isQWS( ) ) // only qwsserver is allowed to suspend 2425 if ( !isQWS( ) ) // only qwsserver is allowed to suspend
2427 return false; 2426 return false;
2428 2427
2429 bool res = false; 2428 bool res = false;
2430 2429
2431 struct timeval tvs, tvn; 2430 struct timeval tvs;
2432 ::gettimeofday ( &tvs, 0 ); 2431 ::gettimeofday ( &tvs, 0 );
2433 2432
2434 ::sync ( ); // flush fs caches 2433 ::sync ( ); // flush fs caches
2435 res = ( ::system ( "cat /dev/fb/0 >/tmp/.buffer; echo > /proc/sys/pm/suspend; cat /tmp/.buffer >/dev/fb/0" ) == 0 ); //TODO make better :) 2434 res = ( ::system ( "cat /dev/fb/0 >/tmp/.buffer; echo > /proc/sys/pm/suspend; cat /tmp/.buffer >/dev/fb/0" ) == 0 ); //TODO make better :)
2436 2435
2437 return res; 2436 return res;
2438} 2437}
2439 2438
@@ -2445,17 +2444,16 @@ bool SIMpad::setSoftSuspend ( bool soft )
2445} 2444}
2446 2445
2447 2446
2448bool SIMpad::setDisplayStatus ( bool on ) 2447bool SIMpad::setDisplayStatus ( bool on )
2449{ 2448{
2450 qDebug( "ODevice for SIMpad: setDisplayStatus(%s)", on? "on" : "off" ); 2449 qDebug( "ODevice for SIMpad: setDisplayStatus(%s)", on? "on" : "off" );
2451 2450
2452 bool res = false; 2451 bool res = false;
2453 int fd;
2454 2452
2455 QString cmdline = QString().sprintf( "echo %s > /proc/cs3", on ? "0xd41a" : "0xd40a" ); //TODO make better :) 2453 QString cmdline = QString().sprintf( "echo %s > /proc/cs3", on ? "0xd41a" : "0xd40a" ); //TODO make better :)
2456 2454
2457 res = ( ::system( (const char*) cmdline ) == 0 ); 2455 res = ( ::system( (const char*) cmdline ) == 0 );
2458 2456
2459 return res; 2457 return res;
2460} 2458}
2461 2459
@@ -2776,16 +2774,17 @@ void Jornada::initButtons ( )
2776 reloadButtonMapping ( ); 2774 reloadButtonMapping ( );
2777 2775
2778 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 2776 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
2779 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); 2777 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
2780} 2778}
2781#endif 2779#endif
2782int Jornada::displayBrightnessResolution ( ) const 2780int Jornada::displayBrightnessResolution ( ) const
2783{ 2781{
2782 return 255;
2784} 2783}
2785 2784
2786bool Jornada::setDisplayBrightness ( int bright ) 2785bool Jornada::setDisplayBrightness ( int bright )
2787{ 2786{
2788 bool res = false; 2787 bool res = false;
2789 int fd; 2788 int fd;
2790 2789
2791 if ( bright > 255 ) 2790 if ( bright > 255 )