author | schurig <schurig> | 2004-09-10 11:59:05 (UTC) |
---|---|---|
committer | schurig <schurig> | 2004-09-10 11:59:05 (UTC) |
commit | ed70ec4945c7816ec6e899207ec8b99e20e10da5 (patch) (unidiff) | |
tree | 1b0a8adab9c7398a799f628297ed9d45a591008f /libopie/odevice.cpp | |
parent | 501c17ed2bb97f2062cb11daddeb698a6a9f2828 (diff) | |
download | opie-ed70ec4945c7816ec6e899207ec8b99e20e10da5.zip opie-ed70ec4945c7816ec6e899207ec8b99e20e10da5.tar.gz opie-ed70ec4945c7816ec6e899207ec8b99e20e10da5.tar.bz2 |
removed some warnings
-rw-r--r-- | libopie/odevice.cpp | 9 |
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 | |||
@@ -1093,25 +1093,25 @@ void Yopy::initButtons ( ) | |||
1093 | connect(sysch, SIGNAL(received(const QCString&,const QByteArray&)), | 1093 | connect(sysch, SIGNAL(received(const QCString&,const QByteArray&)), |
1094 | this, SLOT(systemMessage(const QCString&,const QByteArray&))); | 1094 | this, SLOT(systemMessage(const QCString&,const QByteArray&))); |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | bool Yopy::suspend() | 1097 | bool 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 | ||
1105 | bool Yopy::setDisplayBrightness(int bright) | 1105 | bool 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) |
1114 | ::write(fd, "1\n", 2); | 1114 | ::write(fd, "1\n", 2); |
1115 | else | 1115 | else |
1116 | ::write(fd, "0\n", 2); | 1116 | ::write(fd, "0\n", 2); |
1117 | ::close(fd); | 1117 | ::close(fd); |
@@ -1659,25 +1659,24 @@ void Zaurus::init ( ) | |||
1659 | d-> m_modelstr = "Zaurus SL-C760"; | 1659 | d-> m_modelstr = "Zaurus SL-C760"; |
1660 | } else if ( model == "SHARP Poodle" ) { | 1660 | } else if ( model == "SHARP Poodle" ) { |
1661 | d-> m_model = Model_Zaurus_SLB600; | 1661 | d-> m_model = Model_Zaurus_SLB600; |
1662 | d-> m_modelstr = "Zaurus SL-B500 or SL-5600"; | 1662 | d-> m_modelstr = "Zaurus SL-B500 or SL-5600"; |
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; |
1680 | case Model_Zaurus_SLB600: | 1679 | case Model_Zaurus_SLB600: |
1681 | case Model_Zaurus_SL5500: | 1680 | case Model_Zaurus_SL5500: |
1682 | case Model_Zaurus_SL5000: | 1681 | case Model_Zaurus_SL5000: |
1683 | default: | 1682 | default: |
@@ -2358,25 +2357,25 @@ bool SIMpad::setLedState ( OLed l, OLedState st ) | |||
2358 | read from cs3 | 2357 | read from cs3 |
2359 | && with SIMPAD_LED2_ON | 2358 | && with SIMPAD_LED2_ON |
2360 | write to cs3 */ | 2359 | write to cs3 */ |
2361 | m_leds [0] = st; | 2360 | m_leds [0] = 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 | ||
2370 | bool SIMpad::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) | 2369 | bool 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 | ||
2376 | void SIMpad::timerEvent ( QTimerEvent * ) | 2375 | void SIMpad::timerEvent ( QTimerEvent * ) |
2377 | { | 2376 | { |
2378 | killTimer ( m_power_timer ); | 2377 | killTimer ( m_power_timer ); |
2379 | m_power_timer = 0; | 2378 | m_power_timer = 0; |
2380 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); | 2379 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); |
2381 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); | 2380 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); |
2382 | } | 2381 | } |
@@ -2419,47 +2418,46 @@ void SIMpad::alarmSound ( ) | |||
2419 | #endif | 2418 | #endif |
2420 | } | 2419 | } |
2421 | 2420 | ||
2422 | 2421 | ||
2423 | bool SIMpad::suspend ( ) // Must override because SIMpad does NOT have apm | 2422 | bool 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 | ||
2440 | 2439 | ||
2441 | bool SIMpad::setSoftSuspend ( bool soft ) | 2440 | bool SIMpad::setSoftSuspend ( bool soft ) |
2442 | { | 2441 | { |
2443 | qDebug( "ODevice for SIMpad: UNHANDLED setSoftSuspend(%s)", soft? "on" : "off" ); | 2442 | qDebug( "ODevice for SIMpad: UNHANDLED setSoftSuspend(%s)", soft? "on" : "off" ); |
2444 | return false; | 2443 | return false; |
2445 | } | 2444 | } |
2446 | 2445 | ||
2447 | 2446 | ||
2448 | bool SIMpad::setDisplayStatus ( bool on ) | 2447 | bool 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 | ||
2462 | 2460 | ||
2463 | bool SIMpad::setDisplayBrightness ( int bright ) | 2461 | bool SIMpad::setDisplayBrightness ( int bright ) |
2464 | { | 2462 | { |
2465 | qDebug( "ODevice for SIMpad: setDisplayBrightness( %d )", bright ); | 2463 | qDebug( "ODevice for SIMpad: setDisplayBrightness( %d )", bright ); |
@@ -2772,24 +2770,25 @@ void Jornada::initButtons ( ) | |||
2772 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); | 2770 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); |
2773 | d-> m_buttons-> append ( b ); | 2771 | d-> m_buttons-> append ( b ); |
2774 | } | 2772 | } |
2775 | } | 2773 | } |
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 |
2782 | int Jornada::displayBrightnessResolution ( ) const | 2780 | int Jornada::displayBrightnessResolution ( ) const |
2783 | { | 2781 | { |
2782 | return 255; | ||
2784 | } | 2783 | } |
2785 | 2784 | ||
2786 | bool Jornada::setDisplayBrightness ( int bright ) | 2785 | bool 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 ) |
2792 | bright = 255; | 2791 | bright = 255; |
2793 | if ( bright < 0 ) | 2792 | if ( bright < 0 ) |
2794 | bright = 0; | 2793 | bright = 0; |
2795 | 2794 | ||