summaryrefslogtreecommitdiff
authorzecke <zecke>2004-01-27 19:00:49 (UTC)
committer zecke <zecke>2004-01-27 19:00:49 (UTC)
commit6e34e6e90f3ea6a18101395afc7cf5fe86c427e8 (patch) (unidiff)
tree6577258b34f19c75c96d03667405ff6d7940c55c
parentec32e99fae963a97b527c2c54813a96c284d99cf (diff)
downloadopie-6e34e6e90f3ea6a18101395afc7cf5fe86c427e8.zip
opie-6e34e6e90f3ea6a18101395afc7cf5fe86c427e8.tar.gz
opie-6e34e6e90f3ea6a18101395afc7cf5fe86c427e8.tar.bz2
return QS_FALSE if interface is not implemented
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/autorotateapplet/autorotateimpl.cpp3
-rw-r--r--noncore/applets/notesapplet/notesappletimpl.cpp2
-rw-r--r--noncore/applets/wirelessapplet/wirelessappletimpl.cpp4
3 files changed, 7 insertions, 2 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 @@
1#include "autorotate.h" 1#include "autorotate.h"
2#include "autorotateimpl.h" 2#include "autorotateimpl.h"
3 3
4 4
5AutoRotateImpl::AutoRotateImpl() 5AutoRotateImpl::AutoRotateImpl()
6 : autoRotate(0), ref(0) { 6 : autoRotate(0), ref(0) {
7 qDebug ("here"); 7 qDebug ("here");
8} 8}
9 9
10AutoRotateImpl::~AutoRotateImpl() { 10AutoRotateImpl::~AutoRotateImpl() {
11 delete autoRotate; 11 delete autoRotate;
12} 12}
13 13
14QWidget *AutoRotateImpl::applet( QWidget *parent ) { 14QWidget *AutoRotateImpl::applet( QWidget *parent ) {
15 if ( !autoRotate ) { 15 if ( !autoRotate ) {
16 autoRotate = new AutoRotate( parent ); 16 autoRotate = new AutoRotate( parent );
17 } 17 }
18 return autoRotate; 18 return autoRotate;
19} 19}
20 20
21int AutoRotateImpl::position() const { 21int AutoRotateImpl::position() const {
22 return 7; 22 return 7;
23} 23}
24 24
25QRESULT AutoRotateImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { 25QRESULT AutoRotateImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
26 *iface = 0; 26 *iface = 0;
27 if ( uuid == IID_QUnknown ) { 27 if ( uuid == IID_QUnknown ) {
28 *iface = this; 28 *iface = this;
29 } else if ( uuid == IID_TaskbarApplet ) { 29 } else if ( uuid == IID_TaskbarApplet ) {
30 *iface = this; 30 *iface = this;
31 } 31 } else
32 return QS_FALSE;
32 33
33 if ( *iface ) { 34 if ( *iface ) {
34 (*iface)->addRef(); 35 (*iface)->addRef();
35 } 36 }
36 return QS_OK; 37 return QS_OK;
37} 38}
38 39
39Q_EXPORT_INTERFACE() { 40Q_EXPORT_INTERFACE() {
40 Q_CREATE_INSTANCE( AutoRotateImpl ) 41 Q_CREATE_INSTANCE( AutoRotateImpl )
41} 42}
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 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 L.J. Potter <llornkcor@handhelds.org> 2** Copyright (C) 2002 L.J. Potter <llornkcor@handhelds.org>
3** 3**
4** 4**
5** This file may be distributed and/or modified under the terms of the 5** This file may be distributed and/or modified under the terms of the
6** GNU General Public License version 2 as published by the Free Software 6** GNU General Public License version 2 as published by the Free Software
7** Foundation and appearing in the file LICENSE.GPL included in the 7** Foundation and appearing in the file LICENSE.GPL included in the
8** packaging of this file. 8** packaging of this file.
9** 9**
10** 10**
11**********************************************************************/ 11**********************************************************************/
12#include "notes.h" 12#include "notes.h"
13#include "notesappletimpl.h" 13#include "notesappletimpl.h"
14 14
15 15
16NotesAppletImpl::NotesAppletImpl() 16NotesAppletImpl::NotesAppletImpl()
17 : notes(0), ref(0) { 17 : notes(0), ref(0) {
18} 18}
19 19
20NotesAppletImpl::~NotesAppletImpl() { 20NotesAppletImpl::~NotesAppletImpl() {
21 // not needed though cause we should have a valid parent 21 // not needed though cause we should have a valid parent
22 delete notes; 22 delete notes;
23} 23}
24 24
25QWidget *NotesAppletImpl::applet( QWidget *parent ) { 25QWidget *NotesAppletImpl::applet( QWidget *parent ) {
26 if ( !notes ) 26 if ( !notes )
27 notes = new NotesApplet( parent ); 27 notes = new NotesApplet( parent );
28 return notes; 28 return notes;
29} 29}
30 30
31int NotesAppletImpl::position() const { 31int NotesAppletImpl::position() const {
32 return 6; 32 return 6;
33} 33}
34 34
35QRESULT NotesAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { 35QRESULT NotesAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
36 *iface = 0; 36 *iface = 0;
37 if ( uuid == IID_QUnknown ) 37 if ( uuid == IID_QUnknown )
38 *iface = this; 38 *iface = this;
39 else if ( uuid == IID_TaskbarApplet ) 39 else if ( uuid == IID_TaskbarApplet )
40 *iface = this; 40 *iface = this;
41 else
42 return QS_FALSE;
41 43
42 if ( *iface ) 44 if ( *iface )
43 (*iface)->addRef(); 45 (*iface)->addRef();
44 return QS_OK; 46 return QS_OK;
45} 47}
46 48
47Q_EXPORT_INTERFACE() { 49Q_EXPORT_INTERFACE() {
48 Q_CREATE_INSTANCE( NotesAppletImpl ) 50 Q_CREATE_INSTANCE( NotesAppletImpl )
49} 51}
50 52
51 53
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
@@ -5,60 +5,62 @@
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "wireless.h" 20#include "wireless.h"
21#include "wirelessappletimpl.h" 21#include "wirelessappletimpl.h"
22 22
23 23
24WirelessAppletImpl::WirelessAppletImpl() 24WirelessAppletImpl::WirelessAppletImpl()
25 : wireless(0), ref(0) 25 : wireless(0), ref(0)
26{ 26{
27} 27}
28 28
29WirelessAppletImpl::~WirelessAppletImpl() 29WirelessAppletImpl::~WirelessAppletImpl()
30{ 30{
31 delete wireless; 31 delete wireless;
32} 32}
33 33
34QWidget *WirelessAppletImpl::applet( QWidget *parent ) 34QWidget *WirelessAppletImpl::applet( QWidget *parent )
35{ 35{
36 if ( !wireless ) 36 if ( !wireless )
37 wireless = new WirelessApplet( parent ); 37 wireless = new WirelessApplet( parent );
38 return wireless; 38 return wireless;
39} 39}
40 40
41int WirelessAppletImpl::position() const 41int WirelessAppletImpl::position() const
42{ 42{
43 return 6; 43 return 6;
44} 44}
45 45
46QRESULT WirelessAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 46QRESULT WirelessAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
47{ 47{
48 *iface = 0; 48 *iface = 0;
49 if ( uuid == IID_QUnknown ) 49 if ( uuid == IID_QUnknown )
50 *iface = this; 50 *iface = this;
51 else if ( uuid == IID_TaskbarApplet ) 51 else if ( uuid == IID_TaskbarApplet )
52 *iface = this; 52 *iface = this;
53 53 else
54 return QS_FALSE;
55
54 if ( *iface ) 56 if ( *iface )
55 (*iface)->addRef(); 57 (*iface)->addRef();
56 return QS_OK; 58 return QS_OK;
57} 59}
58 60
59Q_EXPORT_INTERFACE() 61Q_EXPORT_INTERFACE()
60{ 62{
61 Q_CREATE_INSTANCE( WirelessAppletImpl ) 63 Q_CREATE_INSTANCE( WirelessAppletImpl )
62} 64}
63 65
64 66