-rw-r--r-- | inputmethods/pickboard/pickboardimpl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/inputmethods/pickboard/pickboardimpl.cpp b/inputmethods/pickboard/pickboardimpl.cpp index 617acff..a4e8f02 100644 --- a/inputmethods/pickboard/pickboardimpl.cpp +++ b/inputmethods/pickboard/pickboardimpl.cpp | |||
@@ -41,62 +41,61 @@ PickboardImpl::PickboardImpl() | |||
41 | : pickboard(0), icn(0), ref(0) | 41 | : pickboard(0), icn(0), ref(0) |
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 | return "Pickboard"; | ||
75 | } | 74 | } |
76 | 75 | ||
77 | void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) | 76 | void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) |
78 | { | 77 | { |
79 | if ( pickboard ) | 78 | if ( pickboard ) |
80 | 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 ); |
81 | } | 80 | } |
82 | 81 | ||
83 | #ifndef QT_NO_COMPONENT | 82 | #ifndef QT_NO_COMPONENT |
84 | QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 83 | QRESULT PickboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
85 | { | 84 | { |
86 | *iface = 0; | 85 | *iface = 0; |
87 | if ( uuid == IID_QUnknown ) | 86 | if ( uuid == IID_QUnknown ) |
88 | *iface = this; | 87 | *iface = this; |
89 | else if ( uuid == IID_InputMethod ) | 88 | else if ( uuid == IID_InputMethod ) |
90 | *iface = this; | 89 | *iface = this; |
91 | 90 | ||
92 | if ( *iface ) | 91 | if ( *iface ) |
93 | (*iface)->addRef(); | 92 | (*iface)->addRef(); |
94 | return QS_OK; | 93 | return QS_OK; |
95 | } | 94 | } |
96 | 95 | ||
97 | Q_EXPORT_INTERFACE() | 96 | Q_EXPORT_INTERFACE() |
98 | { | 97 | { |
99 | Q_CREATE_INSTANCE( PickboardImpl ) | 98 | Q_CREATE_INSTANCE( PickboardImpl ) |
100 | } | 99 | } |
101 | #endif | 100 | #endif |
102 | 101 | ||