-rw-r--r-- | development/keyview/keyboardimpl.cpp | 4 | ||||
-rw-r--r-- | development/keyview/keyview.cpp | 7 | ||||
-rw-r--r-- | development/keyview/keyview.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/development/keyview/keyboardimpl.cpp b/development/keyview/keyboardimpl.cpp index 673eaa5..0216110 100644 --- a/development/keyview/keyboardimpl.cpp +++ b/development/keyview/keyboardimpl.cpp @@ -166,2 +166,4 @@ void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) { + Q_UNUSED( receiver ); + Q_CONST_UNUSED( slot ); //if ( input ) @@ -178,2 +180,4 @@ QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **ifa *iface = this; + else + return QS_FALSE; 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 @@ -67,2 +67,7 @@ KeyFilter::KeyFilter(QObject * parent, const char *name) : QObject( parent, name +KeyFilter::~KeyFilter() { + /* we need to remove the KeyFilter */ + Opie::Core::OKeyFilter::inst()->remHandler( this ); +} + bool KeyFilter::filter(int unicode, int keycode, int modifiers, bool isPress, @@ -71,3 +76,3 @@ bool KeyFilter::filter(int unicode, int keycode, int modifiers, bool isPress, qDebug( "unicode: %d, keycode: %d, modifiers: %0x, isPress: %d, autoRepeat: %d", - unicode, keycode, modifiers, isPress ); + unicode, keycode, modifiers, isPress, autoRepeat ); emit keyPressed(unicode, keycode, modifiers, isPress, autoRepeat); diff --git a/development/keyview/keyview.h b/development/keyview/keyview.h index 5f1e943..87c0d15 100644 --- a/development/keyview/keyview.h +++ b/development/keyview/keyview.h @@ -25,3 +25,2 @@ private: QLineEdit *autoRepeat; - }; @@ -34,2 +33,3 @@ public: KeyFilter( QObject* parent, const char* name = 0); + virtual ~KeyFilter(); virtual bool filter(int unicode, int keycode, int modifiers, bool isPress, |