summaryrefslogtreecommitdiff
path: root/inputmethods/dasher/QtDasherImpl.cc
Unidiff
Diffstat (limited to 'inputmethods/dasher/QtDasherImpl.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/dasher/QtDasherImpl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/inputmethods/dasher/QtDasherImpl.cc b/inputmethods/dasher/QtDasherImpl.cc
index 55c21b1..9513802 100644
--- a/inputmethods/dasher/QtDasherImpl.cc
+++ b/inputmethods/dasher/QtDasherImpl.cc
@@ -26,60 +26,62 @@ QtDasherImpl::QtDasherImpl()
26} 26}
27 27
28QtDasherImpl::~QtDasherImpl() 28QtDasherImpl::~QtDasherImpl()
29{ 29{
30 delete qtdasherwidget; 30 delete qtdasherwidget;
31 delete icn; 31 delete icn;
32} 32}
33 33
34QWidget *QtDasherImpl::inputMethod( QWidget *parent, Qt::WFlags f ) 34QWidget *QtDasherImpl::inputMethod( QWidget *parent, Qt::WFlags f )
35{ 35{
36 if ( !qtdasherwidget ) { 36 if ( !qtdasherwidget ) {
37 qtdasherwidget = new QtDasherPlugin( parent, "Dasher", f ); 37 qtdasherwidget = new QtDasherPlugin( parent, "Dasher", f );
38 } 38 }
39 return qtdasherwidget; 39 return qtdasherwidget;
40} 40}
41 41
42void QtDasherImpl::resetState() 42void QtDasherImpl::resetState()
43{ 43{
44 if ( qtdasherwidget ) 44 if ( qtdasherwidget )
45 qtdasherwidget->resetState(); 45 qtdasherwidget->resetState();
46} 46}
47 47
48QPixmap *QtDasherImpl::icon() 48QPixmap *QtDasherImpl::icon()
49{ 49{
50 if ( !icn ) 50 if ( !icn )
51 icn = new QPixmap( (const char **)qtdasher_xpm ); 51 icn = new QPixmap( (const char **)qtdasher_xpm );
52 return icn; 52 return icn;
53} 53}
54 54
55QString QtDasherImpl::name() 55QString QtDasherImpl::name()
56{ 56{
57 return qApp->translate( "InputMethods", "Dasher" ); 57 return qApp->translate( "InputMethods", "Dasher" );
58} 58}
59 59
60void QtDasherImpl::onKeyPress( QObject *receiver, const char *slot ) 60void QtDasherImpl::onKeyPress( QObject *receiver, const char *slot )
61{ 61{
62 if ( qtdasherwidget ) 62 if ( qtdasherwidget )
63 QObject::connect( qtdasherwidget, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); 63 QObject::connect( qtdasherwidget, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot );
64} 64}
65 65
66#ifndef QT_NO_COMPONENT 66#ifndef QT_NO_COMPONENT
67QRESULT QtDasherImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 67QRESULT QtDasherImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
68{ 68{
69 *iface = 0; 69 *iface = 0;
70 if ( uuid == IID_QUnknown ) 70 if ( uuid == IID_QUnknown )
71 *iface = this; 71 *iface = this;
72 else if ( uuid == IID_InputMethod ) 72 else if ( uuid == IID_InputMethod )
73 *iface = this; 73 *iface = this;
74 else
75 return QS_FALSE;
74 76
75 if ( *iface ) 77 if ( *iface )
76 (*iface)->addRef(); 78 (*iface)->addRef();
77 return QS_OK; 79 return QS_OK;
78} 80}
79 81
80Q_EXPORT_INTERFACE() 82Q_EXPORT_INTERFACE()
81{ 83{
82 Q_CREATE_INSTANCE( QtDasherImpl ) 84 Q_CREATE_INSTANCE( QtDasherImpl )
83} 85}
84#endif 86#endif
85 87