summaryrefslogtreecommitdiff
path: root/inputmethods/keyboard
Unidiff
Diffstat (limited to 'inputmethods/keyboard') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/keyboard/keyboardimpl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/inputmethods/keyboard/keyboardimpl.cpp b/inputmethods/keyboard/keyboardimpl.cpp
index 3c77fe6..701d35f 100644
--- a/inputmethods/keyboard/keyboardimpl.cpp
+++ b/inputmethods/keyboard/keyboardimpl.cpp
@@ -70,59 +70,61 @@ KeyboardImpl::KeyboardImpl()
70{ 70{
71} 71}
72 72
73KeyboardImpl::~KeyboardImpl() 73KeyboardImpl::~KeyboardImpl()
74{ 74{
75 delete input; 75 delete input;
76 delete icn; 76 delete icn;
77} 77}
78 78
79QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 79QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
80{ 80{
81 if ( !input ) 81 if ( !input )
82 input = new KeyboardInput::Keyboard( parent, "Keyboard", f ); 82 input = new KeyboardInput::Keyboard( parent, "Keyboard", f );
83 return input; 83 return input;
84} 84}
85 85
86void KeyboardImpl::resetState() 86void KeyboardImpl::resetState()
87{ 87{
88 if ( input ) 88 if ( input )
89 input->resetState(); 89 input->resetState();
90} 90}
91 91
92QPixmap *KeyboardImpl::icon() 92QPixmap *KeyboardImpl::icon()
93{ 93{
94 if ( !icn ) 94 if ( !icn )
95 icn = new QPixmap( (const char **)kb_xpm ); 95 icn = new QPixmap( (const char **)kb_xpm );
96 return icn; 96 return icn;
97} 97}
98 98
99QString KeyboardImpl::name() 99QString KeyboardImpl::name()
100{ 100{
101 return qApp->translate( "InputMethods", "Keyboard" ); 101 return qApp->translate( "InputMethods", "Keyboard" );
102} 102}
103 103
104void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot ) 104void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
105{ 105{
106 if ( input ) 106 if ( input )
107 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 107 QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
108} 108}
109 109
110#ifndef QT_NO_COMPONENT 110#ifndef QT_NO_COMPONENT
111QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 111QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
112{ 112{
113 *iface = 0; 113 *iface = 0;
114 if ( uuid == IID_QUnknown ) 114 if ( uuid == IID_QUnknown )
115 *iface = this; 115 *iface = this;
116 else if ( uuid == IID_InputMethod ) 116 else if ( uuid == IID_InputMethod )
117 *iface = this; 117 *iface = this;
118 else
119 return QS_FALSE;
118 120
119 if ( *iface ) 121 if ( *iface )
120 (*iface)->addRef(); 122 (*iface)->addRef();
121 return QS_OK; 123 return QS_OK;
122} 124}
123 125
124Q_EXPORT_INTERFACE() 126Q_EXPORT_INTERFACE()
125{ 127{
126 Q_CREATE_INSTANCE( KeyboardImpl ) 128 Q_CREATE_INSTANCE( KeyboardImpl )
127} 129}
128#endif 130#endif