From 624f8d0fb31bcc732e8c085e43109e6d0fdda55f Mon Sep 17 00:00:00 2001 From: Davide Bettio Date: Sun, 27 Apr 2008 09:29:25 +0000 Subject: [PATCH] API REVIEW: needsFocus()->dies svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801640 --- applet.cpp | 13 ++----------- applet.h | 11 ----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/applet.cpp b/applet.cpp index aaa059f27..bb13612ae 100644 --- a/applet.cpp +++ b/applet.cpp @@ -375,8 +375,6 @@ Applet::Applet(QObject* parentObject, const QVariantList& args) Applet::~Applet() { - needsFocus(false); - if (d->transient) { resetConfigurationObject(); } @@ -1196,13 +1194,6 @@ void Applet::watchForMouseMove( QGraphicsItem * watched, bool watch ) } } -void Applet::needsFocus(bool focus) -{ - if (focus == QGraphicsItem::hasFocus()) { - return; - } -} - bool Applet::hasConfigurationInterface() const { return d->hasConfigurationInterface; @@ -1219,9 +1210,9 @@ bool Applet::eventFilter( QObject *o, QEvent * e ) { if ( e->type() == QEvent::MouseButtonRelease || e->type() == QEvent::FocusIn ) { - needsFocus( true ); + //needsFocus( true ); <-- died } else if ( e->type() == QEvent::FocusOut ) { - needsFocus( false ); + //needsFocus( false ); <-- died } } diff --git a/applet.h b/applet.h index eb2f540bd..d886916b8 100644 --- a/applet.h +++ b/applet.h @@ -675,17 +675,6 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget */ void watchForMouseMove(QGraphicsItem *widget, bool watch); - /** - * Call this whenever focus is needed or not needed. - * - * You do not have to call this method for widgets that have - * been registered with watchForFocus - * - * @see watchForFocus - * @param focus whether to or not to request focus - */ - void needsFocus(bool focus); - /** * @internal event filter; used for focus watching **/