author | zautrix <zautrix> | 2005-01-05 18:00:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-05 18:00:42 (UTC) |
commit | 9bbe06c6cbf70ab8741acc6b356890c072b103e8 (patch) (side-by-side diff) | |
tree | 89ce922f849540b959c6f778c9371f9ff01decf6 /kalarmd | |
parent | 71017beb975666a0f654898ed6a40a5303d567dc (diff) | |
download | kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.zip kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.tar.gz kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.tar.bz2 |
some fixes
-rw-r--r-- | kalarmd/simplealarmdaemonapplet.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp index 38a744f..3277036 100644 --- a/kalarmd/simplealarmdaemonapplet.cpp +++ b/kalarmd/simplealarmdaemonapplet.cpp @@ -1,59 +1,60 @@ #include "simplealarmdaemonapplet.h" #include "simplealarmdaemonimpl.h" #include <qcopchannel_qws.h> #include <qlabel.h> #include <qapp.h> #include <qpe/resource.h> SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() : mApplet( 0 ), ref( 0 ) { } SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() { - delete mApplet; + //delete mApplet; mApplet = 0; } QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) { if ( !mApplet ) { mApplet = new SimpleAlarmDaemonImpl( parent ); if ( QApplication::desktop()->width() < 480 ) mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); else mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& ))); mApplet->show(); } return mApplet; } int SimpleAlarmDaemonApplet::position() const { return 7; } QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { + // qDebug(" SimpleAlarmDaemonApplet::queryInterface "); *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_TaskbarApplet ) *iface = this; + if ( *iface ) { - //(*iface)->addRef(); + (*iface)->addRef(); return QS_OK; } - return QE_NOCOMPONENT; + return QE_NOINTERFACE; } - Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) } |