summaryrefslogtreecommitdiff
path: root/inputmethods/keyboard
Side-by-side diff
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()
{
}
KeyboardImpl::~KeyboardImpl()
{
delete input;
delete icn;
}
QWidget *KeyboardImpl::inputMethod( QWidget *parent, Qt::WFlags f )
{
if ( !input )
input = new KeyboardInput::Keyboard( parent, "Keyboard", f );
return input;
}
void KeyboardImpl::resetState()
{
if ( input )
input->resetState();
}
QPixmap *KeyboardImpl::icon()
{
if ( !icn )
icn = new QPixmap( (const char **)kb_xpm );
return icn;
}
QString KeyboardImpl::name()
{
return qApp->translate( "InputMethods", "Keyboard" );
}
void KeyboardImpl::onKeyPress( QObject *receiver, const char *slot )
{
if ( input )
QObject::connect( input, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
}
#ifndef QT_NO_COMPONENT
QRESULT KeyboardImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
{
*iface = 0;
if ( uuid == IID_QUnknown )
*iface = this;
else if ( uuid == IID_InputMethod )
*iface = this;
+ else
+ return QS_FALSE;
if ( *iface )
(*iface)->addRef();
return QS_OK;
}
Q_EXPORT_INTERFACE()
{
Q_CREATE_INSTANCE( KeyboardImpl )
}
#endif