summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp20
1 files changed, 9 insertions, 11 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
@@ -187,15 +187,18 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
if ( !loggedin && ke->simpleData.keycode != Key_F34 )
return TRUE;
bool press = ke->simpleData.is_press;
- KeyRegisterList::Iterator it;
- for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it )
+ if (!keyRegisterList.isEmpty())
{
- if ((*it).getKeyCode() == ke->simpleData.keycode)
- QCopEnvelope((*it).getChannel().utf8(), (*it).getMessage().utf8());
+ 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;
@@ -227,14 +230,9 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
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;
}