author | zecke <zecke> | 2004-01-27 18:51:03 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-01-27 18:51:03 (UTC) |
commit | b2823e2919b746107b13ebdf603fa04cec8fba72 (patch) (unidiff) | |
tree | 2af5f5c5ebae9873605d069dfc2ebceb63d615aa | |
parent | fbe767bcc9f46f1d9bf680dc91eba983bc39fdeb (diff) | |
download | opie-b2823e2919b746107b13ebdf603fa04cec8fba72.zip opie-b2823e2919b746107b13ebdf603fa04cec8fba72.tar.gz opie-b2823e2919b746107b13ebdf603fa04cec8fba72.tar.bz2 |
Return QS_FALSE if we don't implement the interface queried for
4 files changed, 12 insertions, 4 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginimpl.cpp b/core/pim/today/plugins/addressbook/addresspluginimpl.cpp index 54e620e..15cd805 100644 --- a/core/pim/today/plugins/addressbook/addresspluginimpl.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginimpl.cpp | |||
@@ -15,32 +15,34 @@ | |||
15 | * (at your option) any later version. * | 15 | * (at your option) any later version. * |
16 | * * | 16 | * * |
17 | ***************************************************************************/ | 17 | ***************************************************************************/ |
18 | 18 | ||
19 | #include "addressplugin.h" | 19 | #include "addressplugin.h" |
20 | #include "addresspluginimpl.h" | 20 | #include "addresspluginimpl.h" |
21 | 21 | ||
22 | AddressBookPluginImpl::AddressBookPluginImpl() { | 22 | AddressBookPluginImpl::AddressBookPluginImpl() { |
23 | addressbookPlugin = new AddressBookPlugin(); | 23 | addressbookPlugin = new AddressBookPlugin(); |
24 | } | 24 | } |
25 | 25 | ||
26 | AddressBookPluginImpl::~AddressBookPluginImpl() { | 26 | AddressBookPluginImpl::~AddressBookPluginImpl() { |
27 | delete addressbookPlugin; | 27 | delete addressbookPlugin; |
28 | } | 28 | } |
29 | 29 | ||
30 | 30 | ||
31 | TodayPluginObject* AddressBookPluginImpl::guiPart() { | 31 | TodayPluginObject* AddressBookPluginImpl::guiPart() { |
32 | return addressbookPlugin; | 32 | return addressbookPlugin; |
33 | } | 33 | } |
34 | 34 | ||
35 | QRESULT AddressBookPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { | 35 | QRESULT AddressBookPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { |
36 | *iface = 0; | 36 | *iface = 0; |
37 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { | 37 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { |
38 | *iface = this, (*iface)->addRef(); | 38 | *iface = this, (*iface)->addRef(); |
39 | } | 39 | }else |
40 | return QS_FALSE; | ||
41 | |||
40 | return QS_OK; | 42 | return QS_OK; |
41 | 43 | ||
42 | } | 44 | } |
43 | 45 | ||
44 | Q_EXPORT_INTERFACE() { | 46 | Q_EXPORT_INTERFACE() { |
45 | Q_CREATE_INSTANCE( AddressBookPluginImpl ); | 47 | Q_CREATE_INSTANCE( AddressBookPluginImpl ); |
46 | } | 48 | } |
diff --git a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp index 45736bb..6baffb9 100644 --- a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp | |||
@@ -12,32 +12,34 @@ | |||
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "datebookplugin.h" | 17 | #include "datebookplugin.h" |
18 | #include "datebookpluginimpl.h" | 18 | #include "datebookpluginimpl.h" |
19 | 19 | ||
20 | DatebookPluginImpl::DatebookPluginImpl() { | 20 | DatebookPluginImpl::DatebookPluginImpl() { |
21 | datebookPlugin = new DatebookPlugin(); | 21 | datebookPlugin = new DatebookPlugin(); |
22 | } | 22 | } |
23 | 23 | ||
24 | DatebookPluginImpl::~DatebookPluginImpl() { | 24 | DatebookPluginImpl::~DatebookPluginImpl() { |
25 | delete datebookPlugin; | 25 | delete datebookPlugin; |
26 | } | 26 | } |
27 | 27 | ||
28 | TodayPluginObject* DatebookPluginImpl::guiPart() { | 28 | TodayPluginObject* DatebookPluginImpl::guiPart() { |
29 | return datebookPlugin; | 29 | return datebookPlugin; |
30 | } | 30 | } |
31 | 31 | ||
32 | QRESULT DatebookPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { | 32 | QRESULT DatebookPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { |
33 | *iface = 0; | 33 | *iface = 0; |
34 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { | 34 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { |
35 | *iface = this, (*iface)->addRef(); | 35 | *iface = this, (*iface)->addRef(); |
36 | } | 36 | }else |
37 | return QS_FALSE; | ||
38 | |||
37 | return QS_OK; | 39 | return QS_OK; |
38 | 40 | ||
39 | } | 41 | } |
40 | 42 | ||
41 | Q_EXPORT_INTERFACE() { | 43 | Q_EXPORT_INTERFACE() { |
42 | Q_CREATE_INSTANCE( DatebookPluginImpl ); | 44 | Q_CREATE_INSTANCE( DatebookPluginImpl ); |
43 | } | 45 | } |
diff --git a/core/pim/today/plugins/mail/mailpluginimpl.cpp b/core/pim/today/plugins/mail/mailpluginimpl.cpp index bd57bc9..dfd3a64 100644 --- a/core/pim/today/plugins/mail/mailpluginimpl.cpp +++ b/core/pim/today/plugins/mail/mailpluginimpl.cpp | |||
@@ -15,32 +15,34 @@ | |||
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | #include "mailplugin.h" | 19 | #include "mailplugin.h" |
20 | #include "mailpluginimpl.h" | 20 | #include "mailpluginimpl.h" |
21 | 21 | ||
22 | MailPluginImpl::MailPluginImpl() { | 22 | MailPluginImpl::MailPluginImpl() { |
23 | mailPlugin = new MailPlugin(); | 23 | mailPlugin = new MailPlugin(); |
24 | } | 24 | } |
25 | 25 | ||
26 | MailPluginImpl::~MailPluginImpl() { | 26 | MailPluginImpl::~MailPluginImpl() { |
27 | delete mailPlugin; | 27 | delete mailPlugin; |
28 | } | 28 | } |
29 | 29 | ||
30 | 30 | ||
31 | TodayPluginObject* MailPluginImpl::guiPart() { | 31 | TodayPluginObject* MailPluginImpl::guiPart() { |
32 | return mailPlugin; | 32 | return mailPlugin; |
33 | } | 33 | } |
34 | 34 | ||
35 | QRESULT MailPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { | 35 | QRESULT MailPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { |
36 | *iface = 0; | 36 | *iface = 0; |
37 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { | 37 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { |
38 | *iface = this, (*iface)->addRef(); | 38 | *iface = this, (*iface)->addRef(); |
39 | } | 39 | }else |
40 | return QS_FALSE; | ||
41 | |||
40 | return QS_OK; | 42 | return QS_OK; |
41 | 43 | ||
42 | } | 44 | } |
43 | 45 | ||
44 | Q_EXPORT_INTERFACE() { | 46 | Q_EXPORT_INTERFACE() { |
45 | Q_CREATE_INSTANCE( MailPluginImpl ); | 47 | Q_CREATE_INSTANCE( MailPluginImpl ); |
46 | } | 48 | } |
diff --git a/core/pim/today/plugins/todolist/todopluginimpl.cpp b/core/pim/today/plugins/todolist/todopluginimpl.cpp index c64113c..639587f 100644 --- a/core/pim/today/plugins/todolist/todopluginimpl.cpp +++ b/core/pim/today/plugins/todolist/todopluginimpl.cpp | |||
@@ -13,32 +13,34 @@ | |||
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todoplugin.h" | 17 | #include "todoplugin.h" |
18 | #include "todopluginimpl.h" | 18 | #include "todopluginimpl.h" |
19 | 19 | ||
20 | TodolistPluginImpl::TodolistPluginImpl() { | 20 | TodolistPluginImpl::TodolistPluginImpl() { |
21 | todolistPlugin = new TodolistPlugin(); | 21 | todolistPlugin = new TodolistPlugin(); |
22 | } | 22 | } |
23 | 23 | ||
24 | TodolistPluginImpl::~TodolistPluginImpl() { | 24 | TodolistPluginImpl::~TodolistPluginImpl() { |
25 | delete todolistPlugin; | 25 | delete todolistPlugin; |
26 | } | 26 | } |
27 | 27 | ||
28 | 28 | ||
29 | TodayPluginObject* TodolistPluginImpl::guiPart() { | 29 | TodayPluginObject* TodolistPluginImpl::guiPart() { |
30 | return todolistPlugin; | 30 | return todolistPlugin; |
31 | } | 31 | } |
32 | 32 | ||
33 | QRESULT TodolistPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { | 33 | QRESULT TodolistPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { |
34 | *iface = 0; | 34 | *iface = 0; |
35 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { | 35 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { |
36 | *iface = this, (*iface)->addRef(); | 36 | *iface = this, (*iface)->addRef(); |
37 | } | 37 | }else |
38 | return QS_FALSE; | ||
39 | |||
38 | return QS_OK; | 40 | return QS_OK; |
39 | 41 | ||
40 | } | 42 | } |
41 | 43 | ||
42 | Q_EXPORT_INTERFACE() { | 44 | Q_EXPORT_INTERFACE() { |
43 | Q_CREATE_INSTANCE( TodolistPluginImpl ); | 45 | Q_CREATE_INSTANCE( TodolistPluginImpl ); |
44 | } | 46 | } |