API REVIEW: needsFocus()->dies
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=801640
This commit is contained in:
parent
55881aa054
commit
624f8d0fb3
13
applet.cpp
13
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
|
||||
}
|
||||
}
|
||||
|
||||
|
11
applet.h
11
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
|
||||
**/
|
||||
|
Loading…
Reference in New Issue
Block a user