Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index a75f566..8a7e252 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -158,4 +158,5 @@ struct z_button z_buttons_6000 [] = { | |||
158 | void Zaurus::init(const QString& cpu_info) | 158 | void Zaurus::init(const QString& cpu_info) |
159 | { | 159 | { |
160 | qDebug( "Zaurus::init()" ); | ||
160 | // Set the time to wait until the system is really suspended | 161 | // Set the time to wait until the system is really suspended |
161 | // the delta between apm --suspend and sleeping | 162 | // the delta between apm --suspend and sleeping |
@@ -260,4 +261,5 @@ void Zaurus::init(const QString& cpu_info) | |||
260 | case Model_Zaurus_SLC1000: // fallthrough | 261 | case Model_Zaurus_SLC1000: // fallthrough |
261 | case Model_Zaurus_SLC7x0: | 262 | case Model_Zaurus_SLC7x0: |
263 | initHingeSensor(); | ||
262 | d->m_rotation = rotation(); | 264 | d->m_rotation = rotation(); |
263 | d->m_direction = direction(); | 265 | d->m_direction = direction(); |
@@ -290,4 +292,5 @@ void Zaurus::init(const QString& cpu_info) | |||
290 | void Zaurus::initButtons() | 292 | void Zaurus::initButtons() |
291 | { | 293 | { |
294 | qDebug( "Zaurus::initButtons()" ); | ||
292 | if ( d->m_buttons ) | 295 | if ( d->m_buttons ) |
293 | return; | 296 | return; |
@@ -308,7 +311,6 @@ void Zaurus::initButtons() | |||
308 | case Model_Zaurus_SLC7x0: | 311 | case Model_Zaurus_SLC7x0: |
309 | if ( isQWS( ) ) | 312 | if ( isQWS( ) ) |
310 | { // setup hinge sensor stuff | 313 | { |
311 | addPreHandler(this); | 314 | addPreHandler(this); |
312 | initHingeSensor(); | ||
313 | } | 315 | } |
314 | pz_buttons = z_buttons_c700; | 316 | pz_buttons = z_buttons_c700; |
@@ -602,4 +604,5 @@ Transformation Zaurus::rotation() const | |||
602 | } | 604 | } |
603 | 605 | ||
606 | qDebug( "Zaurus::rotation() - returning '%d'", rot ); | ||
604 | return rot; | 607 | return rot; |
605 | } | 608 | } |
@@ -706,5 +709,5 @@ void Zaurus::initHingeSensor() | |||
706 | if ( !m_hinge.open( IO_ReadOnly ) ) | 709 | if ( !m_hinge.open( IO_ReadOnly ) ) |
707 | { | 710 | { |
708 | qDebug( "Zaurus::init() - Couldn't open /dev/input/event0 for read (%s)", strerror( errno ) ); | 711 | qWarning( "Zaurus::init() - Couldn't open /dev/input/event0 for read (%s)", strerror( errno ) ); |
709 | return; | 712 | return; |
710 | } | 713 | } |
@@ -712,4 +715,6 @@ void Zaurus::initHingeSensor() | |||
712 | QSocketNotifier* sn = new QSocketNotifier( m_hinge.handle(), QSocketNotifier::Read, this ); | 715 | QSocketNotifier* sn = new QSocketNotifier( m_hinge.handle(), QSocketNotifier::Read, this ); |
713 | QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(hingeSensorTriggered()) ); | 716 | QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(hingeSensorTriggered()) ); |
717 | |||
718 | qDebug( "Zaurus::init() - Hinge Sensor Initialization successfully completed" ); | ||
714 | } | 719 | } |
715 | 720 | ||
@@ -730,4 +735,11 @@ void Zaurus::hingeSensorTriggered() | |||
730 | } | 735 | } |
731 | 736 | ||
737 | void Zaurus::systemMessage( const QCString &msg, const QByteArray & ) | ||
738 | { | ||
739 | if ( msg == "deviceButtonMappingChanged()" ) { | ||
740 | reloadButtonMapping(); | ||
741 | } | ||
742 | } | ||
743 | |||
732 | /* | 744 | /* |
733 | * Take code from iPAQ device. | 745 | * Take code from iPAQ device. |