summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -7,35 +7,36 @@ AutoRotateImpl::AutoRotateImpl()
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
@@ -17,35 +17,37 @@ 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
@@ -29,36 +29,38 @@ WirelessAppletImpl::WirelessAppletImpl()
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 )
}