Diffstat (limited to 'development/keyview/keyview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | development/keyview/keyview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/development/keyview/keyview.cpp b/development/keyview/keyview.cpp index 8187744..cf082a8 100644 --- a/development/keyview/keyview.cpp +++ b/development/keyview/keyview.cpp | |||
@@ -62,15 +62,20 @@ void Keyview::updateItems(int u, int k, int m, bool p, bool a) { | |||
62 | } | 62 | } |
63 | 63 | ||
64 | KeyFilter::KeyFilter(QObject * parent, const char *name) : QObject( parent, name ) | 64 | KeyFilter::KeyFilter(QObject * parent, const char *name) : QObject( parent, name ) |
65 | { | 65 | { |
66 | } | 66 | } |
67 | 67 | ||
68 | KeyFilter::~KeyFilter() { | ||
69 | /* we need to remove the KeyFilter */ | ||
70 | Opie::Core::OKeyFilter::inst()->remHandler( this ); | ||
71 | } | ||
72 | |||
68 | bool KeyFilter::filter(int unicode, int keycode, int modifiers, bool isPress, | 73 | bool KeyFilter::filter(int unicode, int keycode, int modifiers, bool isPress, |
69 | bool autoRepeat) { | 74 | bool autoRepeat) { |
70 | 75 | ||
71 | qDebug( "unicode: %d, keycode: %d, modifiers: %0x, isPress: %d, autoRepeat: %d", | 76 | qDebug( "unicode: %d, keycode: %d, modifiers: %0x, isPress: %d, autoRepeat: %d", |
72 | unicode, keycode, modifiers, isPress ); | 77 | unicode, keycode, modifiers, isPress, autoRepeat ); |
73 | emit keyPressed(unicode, keycode, modifiers, isPress, autoRepeat); | 78 | emit keyPressed(unicode, keycode, modifiers, isPress, autoRepeat); |
74 | return 0; // return 1 to stop key emiting | 79 | return 0; // return 1 to stop key emiting |
75 | 80 | ||
76 | } | 81 | } |