|
1 /*! |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <QtGui> |
|
19 #include <QtTest/QtTest> |
|
20 |
|
21 #include <hbapplication.h> |
|
22 #include <hbmainwindow.h> |
|
23 #include <hbaction.h> |
|
24 #include <hbtoolbar.h> |
|
25 #include <hbview.h> |
|
26 #include <hblineedit.h> |
|
27 #include <hbinstance.h> |
|
28 |
|
29 #include "dialpadtest.h" |
|
30 #include "dialpad.h" |
|
31 #include "dialpadkeyhandler.h" |
|
32 #include "dialpadvoicemailboxeventfilter.h" |
|
33 |
|
34 bool mVmbxFilterConstructed; |
|
35 Dialpad* mParameter1; |
|
36 QObject* mParameter2; |
|
37 |
|
38 #ifdef Q_OS_SYMBIAN |
|
39 /*DialpadVoiceMailboxEventFilter::DialpadVoiceMailboxEventFilter(Dialpad* dialPad, QObject* parent) |
|
40 { |
|
41 mVmbxFilterConstructed = true; |
|
42 mParameter1 = dialPad; |
|
43 mParameter2 = parent; |
|
44 }*/ |
|
45 #endif |
|
46 |
|
47 // test cases |
|
48 class mt_KeyHandler : public QObject |
|
49 { |
|
50 Q_OBJECT |
|
51 |
|
52 private slots: |
|
53 void init(); |
|
54 void cleanup(); |
|
55 |
|
56 private: |
|
57 HbMainWindow* mMainWindow; |
|
58 Dialpad* mDialpad; |
|
59 DialpadKeyHandler *mKeyhandler; |
|
60 }; |
|
61 |
|
62 void mt_KeyHandler::init() |
|
63 { |
|
64 mVmbxFilterConstructed = false; |
|
65 mDialpad = new Dialpad(*mMainWindow); |
|
66 mKeyhandler = new DialpadKeyHandler(mDialpad, *hbInstance->allMainWindows().at(0), this); |
|
67 QVERIFY(mKeyhandler != NULL); |
|
68 //QVERIFY(mVmbxFilterConstructed == true); |
|
69 //QVERIFY(mParameter1 == mDialpad); |
|
70 //QVERIFY(mParameter2 == this); |
|
71 } |
|
72 |
|
73 void mt_KeyHandler::cleanup() |
|
74 { |
|
75 delete mDialpad; |
|
76 delete mMainWindow; |
|
77 } |
|
78 |
|
79 |
|
80 DIALPAD_TEST_MAIN(mt_KeyHandler) |
|
81 #include "mt_keyhandler.moc" |