author | zecke <zecke> | 2004-02-05 17:15:20 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-05 17:15:20 (UTC) |
commit | f6487edaaad38c6454fc50697d7884f0bc627489 (patch) (side-by-side diff) | |
tree | 26b2ea805710488c84a731fef576467047fb80fd /inputmethods/pickboard | |
parent | 416c72588577bca18ba1c9180701143e7e572eed (diff) | |
download | opie-f6487edaaad38c6454fc50697d7884f0bc627489.zip opie-f6487edaaad38c6454fc50697d7884f0bc627489.tar.gz opie-f6487edaaad38c6454fc50697d7884f0bc627489.tar.bz2 |
More janitor....
remove ulong ref because we use Q_REFCOUNT which also takes
care of initializing the refcount to 0
"And if you save yourself
You will make him happy
He'll keep you in a jar
And you'll think you're happy
He'll give you breathing holes"
-rw-r--r-- | inputmethods/pickboard/pickboardimpl.cpp | 2 | ||||
-rw-r--r-- | inputmethods/pickboard/pickboardimpl.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/inputmethods/pickboard/pickboardimpl.cpp b/inputmethods/pickboard/pickboardimpl.cpp index 8f449cd..9a21229 100644 --- a/inputmethods/pickboard/pickboardimpl.cpp +++ b/inputmethods/pickboard/pickboardimpl.cpp @@ -1,103 +1,103 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qapplication.h> #include <qobject.h> #include <qpixmap.h> #include "pickboard.h" #include "pickboardimpl.h" /* XPM */ static const char * pb_xpm[]={ "28 7 2 1", "# c #303030", " c None", " ########################## ", " # # # # # # # ", " # # # # # # # ", " ########################## ", " # # # # # # ", " # # # # # # ", " ########################## "}; PickboardImpl::PickboardImpl() - : pickboard(0), icn(0), ref(0) + : pickboard(0), icn(0) { } PickboardImpl::~PickboardImpl() { delete pickboard; delete icn; } QWidget *PickboardImpl::inputMethod( QWidget *parent, Qt::WFlags f ) { if ( !pickboard ) pickboard = new Pickboard( parent, "pickboard", f ); return pickboard; } void PickboardImpl::resetState() { if ( pickboard ) pickboard->resetState(); } QPixmap *PickboardImpl::icon() { if ( !icn ) icn = new QPixmap( (const char **)pb_xpm ); return icn; } QString PickboardImpl::name() { return qApp->translate( "InputMethods", "Pickboard" ); } void PickboardImpl::onKeyPress( QObject *receiver, const char *slot ) { if ( pickboard ) QObject::connect( pickboard, SIGNAL(key(ushort,ushort,ushort,bool,bool)), receiver, slot ); } #ifndef QT_NO_COMPONENT QRESULT PickboardImpl::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( PickboardImpl ) } #endif diff --git a/inputmethods/pickboard/pickboardimpl.h b/inputmethods/pickboard/pickboardimpl.h index 4f23665..8340d0d 100644 --- a/inputmethods/pickboard/pickboardimpl.h +++ b/inputmethods/pickboard/pickboardimpl.h @@ -1,51 +1,50 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef PICKBOARDIMPL_H #define PICKBOARDIMPL_H #include <qpe/inputmethodinterface.h> class Pickboard; class QPixmap; class PickboardImpl : public InputMethodInterface { public: PickboardImpl(); virtual ~PickboardImpl(); #ifndef QT_NO_COMPONENT QRESULT queryInterface( const QUuid&, QUnknownInterface** ); Q_REFCOUNT #endif virtual QWidget *inputMethod( QWidget *parent, Qt::WFlags f ); virtual void resetState(); virtual QPixmap *icon(); virtual QString name(); virtual void onKeyPress( QObject *receiver, const char *slot ); private: Pickboard *pickboard; QPixmap *icn; - ulong ref; }; #endif |