author | zecke <zecke> | 2004-01-27 19:00:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-01-27 19:00:49 (UTC) |
commit | 6e34e6e90f3ea6a18101395afc7cf5fe86c427e8 (patch) (side-by-side diff) | |
tree | 6577258b34f19c75c96d03667405ff6d7940c55c | |
parent | ec32e99fae963a97b527c2c54813a96c284d99cf (diff) | |
download | opie-6e34e6e90f3ea6a18101395afc7cf5fe86c427e8.zip opie-6e34e6e90f3ea6a18101395afc7cf5fe86c427e8.tar.gz opie-6e34e6e90f3ea6a18101395afc7cf5fe86c427e8.tar.bz2 |
return QS_FALSE if interface is not implemented
-rw-r--r-- | noncore/applets/autorotateapplet/autorotateimpl.cpp | 3 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notesappletimpl.cpp | 2 | ||||
-rw-r--r-- | noncore/applets/wirelessapplet/wirelessappletimpl.cpp | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/noncore/applets/autorotateapplet/autorotateimpl.cpp b/noncore/applets/autorotateapplet/autorotateimpl.cpp index 01d8a01..1b15c6d 100644 --- a/noncore/applets/autorotateapplet/autorotateimpl.cpp +++ b/noncore/applets/autorotateapplet/autorotateimpl.cpp @@ -1,41 +1,42 @@ #include "autorotate.h" #include "autorotateimpl.h" AutoRotateImpl::AutoRotateImpl() : autoRotate(0), ref(0) { qDebug ("here"); } AutoRotateImpl::~AutoRotateImpl() { delete autoRotate; } QWidget *AutoRotateImpl::applet( QWidget *parent ) { if ( !autoRotate ) { autoRotate = new AutoRotate( parent ); } return autoRotate; } int AutoRotateImpl::position() const { return 7; } QRESULT AutoRotateImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) { *iface = this; } else if ( uuid == IID_TaskbarApplet ) { *iface = this; - } + } else + return QS_FALSE; if ( *iface ) { (*iface)->addRef(); } return QS_OK; } Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( AutoRotateImpl ) } diff --git a/noncore/applets/notesapplet/notesappletimpl.cpp b/noncore/applets/notesapplet/notesappletimpl.cpp index 0526bad..93de433 100644 --- a/noncore/applets/notesapplet/notesappletimpl.cpp +++ b/noncore/applets/notesapplet/notesappletimpl.cpp @@ -1,51 +1,53 @@ /********************************************************************** ** Copyright (C) 2002 L.J. Potter <llornkcor@handhelds.org> ** ** ** 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. ** ** **********************************************************************/ #include "notes.h" #include "notesappletimpl.h" NotesAppletImpl::NotesAppletImpl() : notes(0), ref(0) { } NotesAppletImpl::~NotesAppletImpl() { // not needed though cause we should have a valid parent delete notes; } QWidget *NotesAppletImpl::applet( QWidget *parent ) { if ( !notes ) notes = new NotesApplet( parent ); return notes; } int NotesAppletImpl::position() const { return 6; } QRESULT NotesAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_TaskbarApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)->addRef(); return QS_OK; } Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( NotesAppletImpl ) } diff --git a/noncore/applets/wirelessapplet/wirelessappletimpl.cpp b/noncore/applets/wirelessapplet/wirelessappletimpl.cpp index eb00459..8b7afcf 100644 --- a/noncore/applets/wirelessapplet/wirelessappletimpl.cpp +++ b/noncore/applets/wirelessapplet/wirelessappletimpl.cpp @@ -1,64 +1,66 @@ /********************************************************************** ** 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 "wireless.h" #include "wirelessappletimpl.h" WirelessAppletImpl::WirelessAppletImpl() : wireless(0), ref(0) { } WirelessAppletImpl::~WirelessAppletImpl() { delete wireless; } QWidget *WirelessAppletImpl::applet( QWidget *parent ) { if ( !wireless ) wireless = new WirelessApplet( parent ); return wireless; } int WirelessAppletImpl::position() const { return 6; } QRESULT WirelessAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_TaskbarApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)->addRef(); return QS_OK; } Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( WirelessAppletImpl ) } |