-rw-r--r-- | core/launcher/main.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 347eee9..b3c331b 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp | |||
@@ -20,31 +20,31 @@ | |||
20 | 20 | ||
21 | #include "desktop.h" | 21 | #include "desktop.h" |
22 | #include "taskbar.h" | 22 | #include "taskbar.h" |
23 | #include "stabmon.h" | 23 | #include "stabmon.h" |
24 | 24 | ||
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/network.h> | 26 | #include <qpe/network.h> |
27 | #include <qpe/config.h> | 27 | #include <qpe/config.h> |
28 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) | 28 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) |
29 | #include <qpe/custom.h> | 29 | #include <qpe/custom.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #include <opie/odevice.h> | ||
33 | |||
32 | #include <qfile.h> | 34 | #include <qfile.h> |
33 | #include <qwindowsystem_qws.h> | 35 | #include <qwindowsystem_qws.h> |
34 | #include <qpe/qcopenvelope_qws.h> | 36 | #include <qpe/qcopenvelope_qws.h> |
35 | #include <qpe/alarmserver.h> | 37 | #include <qpe/alarmserver.h> |
36 | 38 | ||
37 | #include <opie/ohwinfo.h> | ||
38 | |||
39 | #include <stdlib.h> | 39 | #include <stdlib.h> |
40 | #include <stdio.h> | 40 | #include <stdio.h> |
41 | #include <signal.h> | 41 | #include <signal.h> |
42 | #include <unistd.h> | 42 | #include <unistd.h> |
43 | 43 | ||
44 | #if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) | 44 | #if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) |
45 | #include "../calibrate/calibrate.h" | 45 | #include "../calibrate/calibrate.h" |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #ifdef QT_QWS_LOGIN | 48 | #ifdef QT_QWS_LOGIN |
49 | #include "../login/qdmdialogimpl.h" | 49 | #include "../login/qdmdialogimpl.h" |
50 | #endif | 50 | #endif |
@@ -184,40 +184,40 @@ static void initBacklight() | |||
184 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); | 184 | QCopEnvelope e("QPE/System", "setBacklight(int)" ); |
185 | e << -3; // Forced on | 185 | e << -3; // Forced on |
186 | } | 186 | } |
187 | 187 | ||
188 | 188 | ||
189 | class ModelKeyFilter : public QObject, public QWSServer::KeyboardFilter | 189 | class ModelKeyFilter : public QObject, public QWSServer::KeyboardFilter |
190 | { | 190 | { |
191 | public: | 191 | public: |
192 | ModelKeyFilter ( ) : QObject ( 0, "MODEL_KEY_FILTER" ) | 192 | ModelKeyFilter ( ) : QObject ( 0, "MODEL_KEY_FILTER" ) |
193 | { | 193 | { |
194 | bool doinst = false; | 194 | bool doinst = false; |
195 | 195 | ||
196 | m_model = OHwInfo::inst ( )-> model ( ); | 196 | m_model = ODevice::inst ( )-> model ( ); |
197 | m_power_timer = 0; | 197 | m_power_timer = 0; |
198 | 198 | ||
199 | switch ( m_model ) { | 199 | switch ( m_model ) { |
200 | case OMODEL_iPAQ_H31xx: | 200 | case OMODEL_iPAQ_H31xx: |
201 | case OMODEL_iPAQ_H36xx: | 201 | case OMODEL_iPAQ_H36xx: |
202 | case OMODEL_iPAQ_H37xx: | 202 | case OMODEL_iPAQ_H37xx: |
203 | case OMODEL_iPAQ_H38xx: doinst = true; | 203 | case OMODEL_iPAQ_H38xx: doinst = true; |
204 | break; | 204 | break; |
205 | default : break; | 205 | default : break; |
206 | } | 206 | } |
207 | if ( doinst ) | 207 | if ( doinst ) |
208 | QWSServer::setKeyboardFilter ( this ); | 208 | QWSServer::setKeyboardFilter ( this ); |
209 | } | 209 | } |
210 | 210 | ||
211 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) | 211 | virtual bool filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) |
212 | { | 212 | { |
213 | bool kill = false; | 213 | bool kill = false; |
214 | 214 | ||
215 | // Rotate cursor keys 180° | 215 | // Rotate cursor keys 180° |
216 | switch ( m_model ) { | 216 | switch ( m_model ) { |
217 | case OMODEL_iPAQ_H31xx: | 217 | case OMODEL_iPAQ_H31xx: |
218 | case OMODEL_iPAQ_H38xx: { | 218 | case OMODEL_iPAQ_H38xx: { |
219 | int newkeycode = keycode; | 219 | int newkeycode = keycode; |
220 | 220 | ||
221 | switch ( keycode ) { | 221 | switch ( keycode ) { |
222 | case Key_Left : newkeycode = Key_Right; break; | 222 | case Key_Left : newkeycode = Key_Right; break; |
223 | case Key_Right: newkeycode = Key_Left; break; | 223 | case Key_Right: newkeycode = Key_Left; break; |
@@ -258,27 +258,26 @@ public: | |||
258 | return kill; | 258 | return kill; |
259 | } | 259 | } |
260 | 260 | ||
261 | virtual void timerEvent ( QTimerEvent * ) | 261 | virtual void timerEvent ( QTimerEvent * ) |
262 | { | 262 | { |
263 | killTimer ( m_power_timer ); | 263 | killTimer ( m_power_timer ); |
264 | m_power_timer = 0; | 264 | m_power_timer = 0; |
265 | QWSServer::sendKeyEvent ( -1, Key_F35, 0, true, false ); | 265 | QWSServer::sendKeyEvent ( -1, Key_F35, 0, true, false ); |
266 | QWSServer::sendKeyEvent ( -1, Key_F35, 0, false, false ); | 266 | QWSServer::sendKeyEvent ( -1, Key_F35, 0, false, false ); |
267 | } | 267 | } |
268 | 268 | ||
269 | private: | 269 | private: |
270 | OHwModel m_model; | 270 | OModel m_model; |
271 | bool m_power_press; | 271 | int m_power_timer; |
272 | int m_power_timer; | ||
273 | }; | 272 | }; |
274 | 273 | ||
275 | 274 | ||
276 | 275 | ||
277 | int initApplication( int argc, char ** argv ) | 276 | int initApplication( int argc, char ** argv ) |
278 | { | 277 | { |
279 | #ifdef QT_QWS_CASSIOPEIA | 278 | #ifdef QT_QWS_CASSIOPEIA |
280 | initCassiopeia(); | 279 | initCassiopeia(); |
281 | #endif | 280 | #endif |
282 | 281 | ||
283 | #ifdef QPE_OWNAPM | 282 | #ifdef QPE_OWNAPM |
284 | initAPM(); | 283 | initAPM(); |