-rw-r--r-- | inputmethods/pickboard/pickboardimpl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/inputmethods/pickboard/pickboardimpl.cpp b/inputmethods/pickboard/pickboardimpl.cpp index a4e8f02..8f449cd 100644 --- a/inputmethods/pickboard/pickboardimpl.cpp +++ b/inputmethods/pickboard/pickboardimpl.cpp | |||
@@ -42,60 +42,62 @@ PickboardImpl::PickboardImpl() | |||
42 | { | 42 | { |
43 | } | 43 | } |
44 | 44 | ||
45 | PickboardImpl::~PickboardImpl() | 45 | PickboardImpl::~PickboardImpl() |
46 | { | 46 | { |
47 | delete pickboard; | 47 | delete pickboard; |
48 | delete icn; | 48 | delete icn; |
49 | } | 49 | } |
50 | 50 | ||
51 | QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) | 51 | QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) |
52 | { | 52 | { |
53 | if ( !pickboard ) | 53 | if ( !pickboard ) |
54 | pickboard = new Pickboard( parent, "pickboard", f ); | 54 | pickboard = new Pickboard( parent, "pickboard", f ); |
55 | return pickboard; | 55 | return pickboard; |
56 | } | 56 | } |
57 | 57 | ||
58 | void PickboardImpl::resetState() | 58 | void PickboardImpl::resetState() |
59 | { | 59 | { |
60 | if ( pickboard ) | 60 | if ( pickboard ) |
61 | pickboard->resetState(); | 61 | pickboard->resetState(); |
62 | } | 62 | } |
63 | 63 | ||
64 | QPixmap *PickboardImpl::icon() | 64 | QPixmap *PickboardImpl::icon() |
65 | { | 65 | { |
66 | if ( !icn ) | 66 | if ( !icn ) |
67 | icn = new QPixmap( (const char **)pb_xpm ); | 67 | icn = new QPixmap( (const char **)pb_xpm ); |
68 | return icn; | 68 | return icn; |
69 | } | 69 | } |
70 | 70 | ||
71 | QString PickboardImpl::name() | 71 | QString PickboardImpl::name() |
72 | { | 72 | { |
73 | return qApp->translate( "InputMethods", "Pickboard" ); | 73 | return qApp->translate( "InputMethods", "Pickboard" ); |
74 | } | 74 | } |
75 | 75 | ||
76 | void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 76 | void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
77 | { | 77 | { |
78 | if ( pickboard ) | 78 | if ( pickboard ) |
79 | QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); | 79 | QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); |
80 | } | 80 | } |
81 | 81 | ||
82 | #ifndef QT_NO_COMPONENT | 82 | #ifndef QT_NO_COMPONENT |
83 | QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 83 | QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
84 | { | 84 | { |
85 | *iface = 0; | 85 | *iface = 0; |
86 | if ( uuid == IID_QUnknown ) | 86 | if ( uuid == IID_QUnknown ) |
87 | *iface = this; | 87 | *iface = this; |
88 | else if ( uuid == IID_InputMethod ) | 88 | else if ( uuid == IID_InputMethod ) |
89 | *iface = this; | 89 | *iface = this; |
90 | else | ||
91 | return QS_FALSE; | ||
90 | 92 | ||
91 | if ( *iface ) | 93 | if ( *iface ) |
92 | (*iface)->addRef(); | 94 | (*iface)->addRef(); |
93 | return QS_OK; | 95 | return QS_OK; |
94 | } | 96 | } |
95 | 97 | ||
96 | Q_EXPORT_INTERFACE() | 98 | Q_EXPORT_INTERFACE() |
97 | { | 99 | { |
98 | Q_CREATE_INSTANCE( PickboardImpl ) | 100 | Q_CREATE_INSTANCE( PickboardImpl ) |
99 | } | 101 | } |
100 | #endif | 102 | #endif |
101 | 103 | ||