-rw-r--r-- | core/applets/batteryapplet/batteryappletimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/cardmon/cardmonimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/clipboardapplet/clipboardappletimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/clockapplet/clockappletimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/homeapplet/home.cpp | 2 | ||||
-rw-r--r-- | core/applets/irdaapplet/irdaappletimpl.cpp | 4 | ||||
-rw-r--r-- | core/applets/logoutapplet/logout.cpp | 2 | ||||
-rw-r--r-- | core/applets/multikeyapplet/multikeyappletimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/restartapplet/restartappletimpl.cpp | 4 | ||||
-rw-r--r-- | core/applets/restartapplet2/restart.cpp | 2 | ||||
-rw-r--r-- | core/applets/rotateapplet/rotate.cpp | 2 | ||||
-rw-r--r-- | core/applets/screenshotapplet/screenshotappletimpl.cpp | 4 | ||||
-rw-r--r-- | core/applets/suspendapplet/suspend.cpp | 2 | ||||
-rw-r--r-- | core/applets/vmemo/vmemoimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/volumeapplet/volumeappletimpl.cpp | 2 | ||||
-rw-r--r-- | core/applets/vtapplet/vt.cpp | 2 | ||||
-rw-r--r-- | core/obex/obeximpl.cpp | 2 |
17 files changed, 37 insertions, 3 deletions
diff --git a/core/applets/batteryapplet/batteryappletimpl.cpp b/core/applets/batteryapplet/batteryappletimpl.cpp index 3f3079a..9ad0382 100644 --- a/core/applets/batteryapplet/batteryappletimpl.cpp +++ b/core/applets/batteryapplet/batteryappletimpl.cpp @@ -21,43 +21,45 @@ #include "batteryappletimpl.h" BatteryAppletImpl::BatteryAppletImpl() : battery(0), ref(0) { } BatteryAppletImpl::~BatteryAppletImpl() { delete battery; } QWidget *BatteryAppletImpl::applet( QWidget *parent ) { if ( !battery ) battery = new BatteryMeter( parent ); return battery; } int BatteryAppletImpl::position() const { return 8; } QRESULT BatteryAppletImpl::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( BatteryAppletImpl ) } diff --git a/core/applets/cardmon/cardmonimpl.cpp b/core/applets/cardmon/cardmonimpl.cpp index 0aa55de..265214e 100644 --- a/core/applets/cardmon/cardmonimpl.cpp +++ b/core/applets/cardmon/cardmonimpl.cpp @@ -1,40 +1,42 @@ #include "cardmon.h" #include "cardmonimpl.h" CardMonitorImpl::CardMonitorImpl() : cardMonitor(0), ref(0) { } CardMonitorImpl::~CardMonitorImpl() { delete cardMonitor; } QWidget *CardMonitorImpl::applet( QWidget *parent ) { if ( !cardMonitor ) { cardMonitor = new CardMonitor( parent ); } return cardMonitor; } int CardMonitorImpl::position() const { return 7; } QRESULT CardMonitorImpl::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( CardMonitorImpl ) } diff --git a/core/applets/clipboardapplet/clipboardappletimpl.cpp b/core/applets/clipboardapplet/clipboardappletimpl.cpp index 8080690..8fcf117 100644 --- a/core/applets/clipboardapplet/clipboardappletimpl.cpp +++ b/core/applets/clipboardapplet/clipboardappletimpl.cpp @@ -21,44 +21,46 @@ #include "clipboardappletimpl.h" ClipboardAppletImpl::ClipboardAppletImpl() : clipboard(0), ref(0) { } ClipboardAppletImpl::~ClipboardAppletImpl() { delete clipboard; } QWidget *ClipboardAppletImpl::applet( QWidget *parent ) { if ( !clipboard ) clipboard = new ClipboardApplet( parent ); return clipboard; } int ClipboardAppletImpl::position() const { return 6; } QRESULT ClipboardAppletImpl::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( ClipboardAppletImpl ) } diff --git a/core/applets/clockapplet/clockappletimpl.cpp b/core/applets/clockapplet/clockappletimpl.cpp index 8bf1baf..2b9cc05 100644 --- a/core/applets/clockapplet/clockappletimpl.cpp +++ b/core/applets/clockapplet/clockappletimpl.cpp @@ -22,44 +22,46 @@ ClockAppletImpl::ClockAppletImpl() : clock(0), ref(0) { } ClockAppletImpl::~ClockAppletImpl() { delete clock; } QWidget *ClockAppletImpl::applet( QWidget *parent ) { if ( !clock ) clock = new LauncherClock( parent ); return clock; } int ClockAppletImpl::position() const { return 10; } #ifndef QT_NO_COMPONENT QRESULT ClockAppletImpl::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( ClockAppletImpl ) } #endif diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp index 017de27..36307ab 100644 --- a/core/applets/homeapplet/home.cpp +++ b/core/applets/homeapplet/home.cpp @@ -42,44 +42,46 @@ QString HomeApplet::tr( const char* s, const char* p ) const return qApp->translate( "HomeApplet", s, p ); } QIconSet HomeApplet::icon ( ) const { QPixmap pix; QImage img = Resource::loadImage ( "home" ); if ( !img. isNull ( )) pix. convertFromImage ( img. smoothScale ( 14, 14 )); return pix; } QPopupMenu *HomeApplet::popup ( QWidget * ) const { return 0; } void HomeApplet::activated ( ) { // to desktop (home) QCopEnvelope ( "QPE/Application/qpe", "raise()" ); } QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)-> addRef ( ); return QS_OK; } Q_EXPORT_INTERFACE( ) { Q_CREATE_INSTANCE( HomeApplet ) } diff --git a/core/applets/irdaapplet/irdaappletimpl.cpp b/core/applets/irdaapplet/irdaappletimpl.cpp index 02443db..3617698 100644 --- a/core/applets/irdaapplet/irdaappletimpl.cpp +++ b/core/applets/irdaapplet/irdaappletimpl.cpp @@ -21,44 +21,46 @@ #include "irdaappletimpl.h" IrdaAppletImpl::IrdaAppletImpl() : irda(0), ref(0) { } IrdaAppletImpl::~IrdaAppletImpl() { delete irda; } QWidget *IrdaAppletImpl::applet( QWidget *parent ) { if ( !irda ) irda = new IrdaApplet( parent ); return irda; } int IrdaAppletImpl::position() const { return 6; } QRESULT IrdaAppletImpl::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( IrdaAppletImpl ) } diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp index 1769ae6..8d3cdba 100644 --- a/core/applets/logoutapplet/logout.cpp +++ b/core/applets/logoutapplet/logout.cpp @@ -82,43 +82,45 @@ public: void LogoutApplet::activated ( ) { QMessageBox mb ( tr( "Logout" ), tr( "Do you really want to\nend this session ?" ), QMessageBox::NoIcon, QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape, QMessageBox::NoButton ); mb. setButtonText ( QMessageBox::Yes, "Yes" ); mb. setButtonText ( QMessageBox::No, "No" ); mb. setIconPixmap ( icon ( ). pixmap ( )); if ( mb. exec ( ) == QMessageBox::Yes ) { { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); } qApp-> processEvents ( ); // ensure the message goes out. sleep ( 1 ); // You have 1 second to comply. ((HackApplication *) qApp )-> emit_about_to_quit ( ); qApp-> quit(); } } QRESULT LogoutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)-> addRef ( ); return QS_OK; } Q_EXPORT_INTERFACE( ) { Q_CREATE_INSTANCE( LogoutApplet ) } diff --git a/core/applets/multikeyapplet/multikeyappletimpl.cpp b/core/applets/multikeyapplet/multikeyappletimpl.cpp index 4644556..adf92c4 100644 --- a/core/applets/multikeyapplet/multikeyappletimpl.cpp +++ b/core/applets/multikeyapplet/multikeyappletimpl.cpp @@ -15,43 +15,45 @@ #include "multikeyappletimpl.h" MultikeyAppletImpl::MultikeyAppletImpl() : kbd(0), ref(0) { } MultikeyAppletImpl::~MultikeyAppletImpl() { delete kbd; } QWidget *MultikeyAppletImpl::applet( QWidget *parent ) { if ( !kbd ) kbd = new Multikey(parent); return kbd; } int MultikeyAppletImpl::position() const { return 10; } #ifndef QT_NO_COMPONENT QRESULT MultikeyAppletImpl::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( MultikeyAppletImpl ) } #endif diff --git a/core/applets/restartapplet/restartappletimpl.cpp b/core/applets/restartapplet/restartappletimpl.cpp index e675c0b..5b0092d 100644 --- a/core/applets/restartapplet/restartappletimpl.cpp +++ b/core/applets/restartapplet/restartappletimpl.cpp @@ -22,44 +22,46 @@ RestartAppletImpl::RestartAppletImpl() : restart(0), ref(0) { } RestartAppletImpl::~RestartAppletImpl() { delete restart; } QWidget *RestartAppletImpl::applet( QWidget *parent ) { qDebug("restart applet"); if ( !restart ) restart = new RestartApplet( parent ); return restart; } int RestartAppletImpl::position() const { return 6; } QRESULT RestartAppletImpl::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( RestartAppletImpl ) } diff --git a/core/applets/restartapplet2/restart.cpp b/core/applets/restartapplet2/restart.cpp index caed9e5..576087b 100644 --- a/core/applets/restartapplet2/restart.cpp +++ b/core/applets/restartapplet2/restart.cpp @@ -64,44 +64,46 @@ QString RestartApplet::text ( ) const { return tr( "Restart Opie" ); } QIconSet RestartApplet::icon ( ) const { QPixmap pix; QImage img = ( const char** ) restart_xpm ;//Resource::loadImage ( "Run" ); if ( !img. isNull ( )) pix. convertFromImage ( img. smoothScale ( 14, 14 )); return pix; } QPopupMenu *RestartApplet::popup ( QWidget * ) const { return 0; } void RestartApplet::activated ( ) { QCopEnvelope e("QPE/System", "restart()"); } QRESULT RestartApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)-> addRef ( ); return QS_OK; } Q_EXPORT_INTERFACE( ) { Q_CREATE_INSTANCE( RestartApplet ) } diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index 906063e..b676c74 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp @@ -213,42 +213,44 @@ void RotateApplet::activated() newRotation = defaultRotation; } else { if ( rot == CCW ) { newRotation = ( defaultRotation + 90 ) % 360; } else if ( rot == CW ) { newRotation = ( defaultRotation + 270 ) % 360; } else if ( rot == Flip ) { newRotation = ( defaultRotation + 180 ) % 360; } } QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); env << newRotation; m_flipped = !m_flipped; } QRESULT RotateApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)->addRef(); return QS_OK; } Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( RotateApplet ) } diff --git a/core/applets/screenshotapplet/screenshotappletimpl.cpp b/core/applets/screenshotapplet/screenshotappletimpl.cpp index a537162..4a7512e 100644 --- a/core/applets/screenshotapplet/screenshotappletimpl.cpp +++ b/core/applets/screenshotapplet/screenshotappletimpl.cpp @@ -21,44 +21,46 @@ #include "screenshotappletimpl.h" ScreenshotAppletImpl::ScreenshotAppletImpl() : screenshot(0), ref(0) { } ScreenshotAppletImpl::~ScreenshotAppletImpl() { delete screenshot; } QWidget *ScreenshotAppletImpl::applet( QWidget *parent ) { if ( !screenshot ) screenshot = new ScreenshotApplet( parent ); return screenshot; } int ScreenshotAppletImpl::position() const { return 6; } QRESULT ScreenshotAppletImpl::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( ScreenshotAppletImpl ) } diff --git a/core/applets/suspendapplet/suspend.cpp b/core/applets/suspendapplet/suspend.cpp index 4bdc8fb..63f16b8 100644 --- a/core/applets/suspendapplet/suspend.cpp +++ b/core/applets/suspendapplet/suspend.cpp @@ -42,44 +42,46 @@ QString SuspendApplet::tr( const char* s, const char* p ) const return qApp->translate( "SuspendApplet", s, p ); } QIconSet SuspendApplet::icon ( ) const { QPixmap pix; QImage img = Resource::loadImage ( "suspend" ); if ( !img. isNull ( )) pix. convertFromImage ( img. smoothScale ( 14, 14 )); return pix; } QPopupMenu *SuspendApplet::popup ( QWidget * ) const { return 0; } void SuspendApplet::activated ( ) { // suspend QCopEnvelope ( "QPE/System", "suspend()" ); } QRESULT SuspendApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)-> addRef ( ); return QS_OK; } Q_EXPORT_INTERFACE( ) { Q_CREATE_INSTANCE( SuspendApplet ) } diff --git a/core/applets/vmemo/vmemoimpl.cpp b/core/applets/vmemo/vmemoimpl.cpp index ef4a3a6..71d47e5 100644 --- a/core/applets/vmemo/vmemoimpl.cpp +++ b/core/applets/vmemo/vmemoimpl.cpp @@ -18,42 +18,44 @@ #include "vmemoimpl.h" VMemoAppletImpl::VMemoAppletImpl() : vmemo(0), ref(0) { } VMemoAppletImpl::~VMemoAppletImpl() { delete vmemo; } QWidget *VMemoAppletImpl::applet( QWidget *parent ) { if ( !vmemo ) vmemo = new VMemo( parent ); return vmemo; } int VMemoAppletImpl::position() const { return 6; } QRESULT VMemoAppletImpl::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( VMemoAppletImpl ) } diff --git a/core/applets/volumeapplet/volumeappletimpl.cpp b/core/applets/volumeapplet/volumeappletimpl.cpp index 47506cc..80b3e74 100644 --- a/core/applets/volumeapplet/volumeappletimpl.cpp +++ b/core/applets/volumeapplet/volumeappletimpl.cpp @@ -22,44 +22,46 @@ #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> VolumeAppletImpl::VolumeAppletImpl() : volume(0), ref(0) { } VolumeAppletImpl::~VolumeAppletImpl() { delete volume; } QWidget *VolumeAppletImpl::applet( QWidget *parent ) { if ( !volume ) volume = new VolumeApplet( parent ); return volume; } int VolumeAppletImpl::position() const { return 6; } QRESULT VolumeAppletImpl::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( VolumeAppletImpl ) } diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp index 4cc2d60..cdd3c97 100644 --- a/core/applets/vtapplet/vt.cpp +++ b/core/applets/vtapplet/vt.cpp @@ -119,44 +119,46 @@ void VTApplet::updateMenu() for ( int i = 1; i < 10; ++i ) { int result = ioctl( fd, VT_DISALLOCATE, i ); /* if ( result == -1 ) qDebug( "VT %d disallocated == free", i ); else qDebug( "VT %d _not_ disallocated == busy", i ); */ submenu->setItemEnabled( 500+i, result == -1 ); } ::close( fd ); } void VTApplet::activated() { qDebug( "VTApplet::activated()" ); } QRESULT VTApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) *iface = this; else if ( uuid == IID_MenuApplet ) *iface = this; + else + return QS_FALSE; if ( *iface ) (*iface)-> addRef ( ); return QS_OK; } Q_EXPORT_INTERFACE( ) { Q_CREATE_INSTANCE( VTApplet ) } diff --git a/core/obex/obeximpl.cpp b/core/obex/obeximpl.cpp index 5bfc779..5b53644 100644 --- a/core/obex/obeximpl.cpp +++ b/core/obex/obeximpl.cpp @@ -1,30 +1,32 @@ #include "obexhandler.h" #include "obeximpl.h" using namespace OpieObex; /* TRANSLATOR OpieObex::ObexImpl */ ObexImpl::ObexImpl() { m_handler = new ObexHandler; } ObexImpl::~ObexImpl() { delete m_handler; } QRESULT ObexImpl::queryInterface( const QUuid& uuid, QUnknownInterface **iface ) { *iface = 0; if ( uuid == IID_QUnknown ) { *iface = this; }else if ( uuid == IID_ObexInterface ) *iface = this; + else + return QS_FALSE; if (*iface) (*iface)->addRef(); return QS_OK; } Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( ObexImpl ) } |