summaryrefslogtreecommitdiff
authorschurig <schurig>2004-09-10 08:04:41 (UTC)
committer schurig <schurig>2004-09-10 08:04:41 (UTC)
commit1ce7786a16ee7b9679391090eeedc4cbcaab81ca (patch) (unidiff)
tree93e562be7ff03ade88d3cc9838c8420a02a5ff8d
parent0209835eb255beb66cf021c02e659ed8ab02dcd1 (diff)
downloadopie-1ce7786a16ee7b9679391090eeedc4cbcaab81ca.zip
opie-1ce7786a16ee7b9679391090eeedc4cbcaab81ca.tar.gz
opie-1ce7786a16ee7b9679391090eeedc4cbcaab81ca.tar.bz2
whitespace changes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp46
1 files changed, 28 insertions, 18 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index f1bce40..a2302d8 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -58,26 +58,32 @@ static ServerApplication *serverApp = 0;
58static int loggedin=0; 58static int loggedin=0;
59 59
60QCopKeyRegister::QCopKeyRegister() 60QCopKeyRegister::QCopKeyRegister()
61 : m_keyCode( 0 ) { 61 : m_keyCode( 0 )
62{
62} 63}
63 64
64QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m ) 65QCopKeyRegister::QCopKeyRegister( int k, const QCString& c, const QCString& m )
65 :m_keyCode( k ), m_channel( c ), m_message( m ) { 66 :m_keyCode( k ), m_channel( c ), m_message( m )
67{
66} 68}
67 69
68int QCopKeyRegister::keyCode()const { 70int QCopKeyRegister::keyCode() const
71{
69 return m_keyCode; 72 return m_keyCode;
70} 73}
71 74
72QCString QCopKeyRegister::channel()const { 75QCString QCopKeyRegister::channel() const
76{
73 return m_channel; 77 return m_channel;
74} 78}
75 79
76QCString QCopKeyRegister::message()const { 80QCString QCopKeyRegister::message() const
81{
77 return m_message; 82 return m_message;
78} 83}
79 84
80bool QCopKeyRegister::send() { 85bool QCopKeyRegister::send()
86{
81 if (m_channel.isNull() ) 87 if (m_channel.isNull() )
82 return false; 88 return false;
83 89
@@ -157,15 +163,18 @@ void KeyFilter::timerEvent(QTimerEvent* e)
157 } 163 }
158} 164}
159 165
160void KeyFilter::registerKey( const QCopKeyRegister& key ) { 166void KeyFilter::registerKey( const QCopKeyRegister& key )
167{
161 m_keys.insert( key.keyCode(), key ); 168 m_keys.insert( key.keyCode(), key );
162} 169}
163 170
164void KeyFilter::unregisterKey( const QCopKeyRegister& key ) { 171void KeyFilter::unregisterKey( const QCopKeyRegister& key )
172{
165 m_keys.remove( key.keyCode() ); 173 m_keys.remove( key.keyCode() );
166} 174}
167 175
168bool KeyFilter::keyRegistered( int key ) { 176bool KeyFilter::keyRegistered( int key )
177{
169 /* 178 /*
170 * Check if we've a key registered 179 * Check if we've a key registered
171 */ 180 */
@@ -173,7 +182,6 @@ bool KeyFilter::keyRegistered( int key ) {
173 return false; 182 return false;
174 else 183 else
175 return true; 184 return true;
176
177} 185}
178 186
179bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepeat) 187bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepeat)
@@ -197,7 +205,6 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe
197 return true; 205 return true;
198 }else { 206 }else {
199 207
200
201 // First check to see if DeviceButtonManager knows something about this button: 208 // First check to see if DeviceButtonManager knows something about this button:
202 const ODeviceButton* button = ODevice::inst()->buttonForKeycode(keycode); 209 const ODeviceButton* button = ODevice::inst()->buttonForKeycode(keycode);
203 if (button && !autoRepeat) { 210 if (button && !autoRepeat) {
@@ -266,7 +273,8 @@ bool ServerApplication::doRestart = FALSE;
266bool ServerApplication::allowRestart = TRUE; 273bool ServerApplication::allowRestart = TRUE;
267bool ServerApplication::ms_is_starting = TRUE; 274bool ServerApplication::ms_is_starting = TRUE;
268 275
269void ServerApplication::switchLCD( bool on ) { 276void ServerApplication::switchLCD( bool on )
277{
270 if ( !qApp ) 278 if ( !qApp )
271 return; 279 return;
272 280
@@ -359,13 +367,13 @@ ServerApplication::~ServerApplication()
359{ 367{
360 ungrabKeyboard(); 368 ungrabKeyboard();
361 369
362
363 delete pa; 370 delete pa;
364 delete m_ps; 371 delete m_ps;
365 delete m_ps_last; 372 delete m_ps_last;
366} 373}
367 374
368void ServerApplication::apmTimeout() { 375void ServerApplication::apmTimeout()
376{
369 serverApp-> checkMemory( ); // in case no events are generated 377 serverApp-> checkMemory( ); // in case no events are generated
370 *m_ps_last = *m_ps; 378 *m_ps_last = *m_ps;
371 *m_ps = PowerStatusManager::readStatus(); 379 *m_ps = PowerStatusManager::readStatus();
@@ -408,7 +416,8 @@ void ServerApplication::apmTimeout() {
408} 416}
409 417
410void ServerApplication::systemMessage( const QCString& msg, 418void ServerApplication::systemMessage( const QCString& msg,
411 const QByteArray& data ) { 419 const QByteArray& data )
420{
412 QDataStream stream ( data, IO_ReadOnly ); 421 QDataStream stream ( data, IO_ReadOnly );
413 422
414 if ( msg == "setScreenSaverInterval(int)" ) { 423 if ( msg == "setScreenSaverInterval(int)" ) {
@@ -553,7 +562,6 @@ void ServerApplication::togglePower()
553 m_suspendTime = QDateTime::currentDateTime(); 562 m_suspendTime = QDateTime::currentDateTime();
554 563
555#ifdef QWS 564#ifdef QWS
556
557 if ( Opie::Security::MultiauthPassword::needToAuthenticate ( true ) && qt_screen ) { 565 if ( Opie::Security::MultiauthPassword::needToAuthenticate ( true ) && qt_screen ) {
558 // Should use a big black window instead. 566 // Should use a big black window instead.
559 // But this would not show up fast enough 567 // But this would not show up fast enough
@@ -627,7 +635,8 @@ bool ServerApplication::qwsEventFilter( QWSEvent *e )
627 up = TRUE; 635 up = TRUE;
628 screenClick(FALSE); 636 screenClick(FALSE);
629 } 637 }
630 }else if ( e->type == QWSEvent::Key ) { 638 } else
639 if ( e->type == QWSEvent::Key ) {
631 QWSKeyEvent * ke = static_cast<QWSKeyEvent*>( e ); 640 QWSKeyEvent * ke = static_cast<QWSKeyEvent*>( e );
632 if ( kf->checkButtonAction( false, 641 if ( kf->checkButtonAction( false,
633 ke-> simpleData.keycode, 642 ke-> simpleData.keycode,
@@ -650,7 +659,8 @@ void ServerApplication::showSafeMode()
650 "and the system is now in Safe Mode. " 659 "and the system is now in Safe Mode. "
651 "Plugins are not loaded in Safe Mode. " 660 "Plugins are not loaded in Safe Mode. "
652 "You can use the Plugin Manager to " 661 "You can use the Plugin Manager to "
653 "disable plugins that cause system error."), tr("OK"), tr("Plugin Manager..."), 0) == 1 ) { 662 "disable plugins that cause system error."), tr("OK"), tr("Plugin Manager..."), 0) == 1 )
663 {
654 Global::execute( "pluginmanager" ); 664 Global::execute( "pluginmanager" );
655 } 665 }
656#endif 666#endif