author | jeremy <jeremy> | 2002-02-15 21:29:03 (UTC) |
---|---|---|
committer | jeremy <jeremy> | 2002-02-15 21:29:03 (UTC) |
commit | a176c76090a3ba74f350d2066d6762c9b9a7eb3b (patch) (side-by-side diff) | |
tree | b2dd448bd0fa8bd3d1e1730b44427f5c2f5f052f | |
parent | b0768575b7bc1e4fe477d37a49cccc7e3d92bf85 (diff) | |
download | opie-a176c76090a3ba74f350d2066d6762c9b9a7eb3b.zip opie-a176c76090a3ba74f350d2066d6762c9b9a7eb3b.tar.gz opie-a176c76090a3ba74f350d2066d6762c9b9a7eb3b.tar.bz2 |
Added checking for an empty keyRegisterList for increased performance :)
-rw-r--r-- | core/launcher/desktop.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index ce99bad..a00fae2 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -185,18 +185,21 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) if ( e->type == QWSEvent::Key ) { QWSKeyEvent *ke = (QWSKeyEvent *)e; if ( !loggedin && ke->simpleData.keycode != Key_F34 ) return TRUE; bool press = ke->simpleData.is_press; + if (!keyRegisterList.isEmpty()) + { KeyRegisterList::Iterator it; for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { if ((*it).getKeyCode() == ke->simpleData.keycode) QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8()); } + } if ( !keyboardGrabbed() ) { if ( ke->simpleData.keycode == Key_F9 ) { if ( press ) emit datebook(); return TRUE; } @@ -225,18 +228,13 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) } if ( ke->simpleData.keycode == Key_F13 ) { if ( press ) emit email(); return TRUE; } } - /* - if ( ke->simpleData.keycode == 4096 ) { - QCopEnvelope e("QPE/VMemo", "toggleRecord()"); - return TRUE; - } - */ + if ( ke->simpleData.keycode == Key_F34 ) { if ( press ) emit power(); return TRUE; } if ( ke->simpleData.keycode == Key_F35 ) { if ( press ) emit backlight(); |