telutils/dialpad/src/dialpadkeyhandler.cpp
changeset 19 e44a8c097b15
parent 13 e32024264ebb
child 23 427125ac6cb8
--- a/telutils/dialpad/src/dialpadkeyhandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpadkeyhandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -19,19 +19,28 @@
 #include "dialpadkeyhandler.h"
 #include "dialpadvoicemailboxeventfilter.h"
 #include "dialpadbluetootheventfilter.h"
+#include "dialpadkeysequenceeventfilter.h"
 #include "qtphonesrvlog.h"
 
-DialpadKeyHandler::DialpadKeyHandler(Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) : QObject(parent),  mMainWindow(mainWindow)
+DialpadKeyHandler::DialpadKeyHandler(
+    Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) 
+    : 
+    QObject(parent),
+	mMainWindow(mainWindow),
+	mVmbxFilter(0),
+	mBtFilter(0),
+	mKeySequenceFilter(0)
 {
     PHONE_TRACE;
-    mVmbxFilter = new DialpadVoiceMailboxEventFilter(dialPad, this);
-    Q_ASSERT(mVmbxFilter != NULL);
-    mBtFilter = new DialpadBluetoothEventFilter(dialPad, this);
-    Q_ASSERT(mBtFilter != NULL);
-
+    
+    mVmbxFilter.reset(new DialpadVoiceMailboxEventFilter(dialPad));
+    mBtFilter.reset(new DialpadBluetoothEventFilter(dialPad));
+    mKeySequenceFilter.reset(new DialpadKeySequenceEventFilter(dialPad));
+    
     // Stack different event filters
-    mMainWindow.installEventFilter(mVmbxFilter);
-    mMainWindow.installEventFilter(mBtFilter);
+    mMainWindow.installEventFilter(mVmbxFilter.data());
+    mMainWindow.installEventFilter(mBtFilter.data());
+    mMainWindow.installEventFilter(mKeySequenceFilter.data());
 }
 
 DialpadKeyHandler::~DialpadKeyHandler()