Use qobject_cast

svn path=/trunk/KDE/kdebase/workspace/; revision=486278
This commit is contained in:
Laurent Montel 2005-12-07 10:51:10 +00:00
parent 6844010935
commit fe6805d25c

View file

@ -28,6 +28,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kglobalaccel.h> #include <kglobalaccel.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QToolButton>
#include <kipc.h> #include <kipc.h>
#include "plugins.h" #include "plugins.h"
@ -1715,7 +1716,7 @@ unsigned int Workspace::sendFakedMouseEvent( QPoint pos, WId w, MouseEmulation t
if ( !w ) if ( !w )
return state; return state;
QWidget* widget = QWidget::find( w ); QWidget* widget = QWidget::find( w );
if ( (!widget || widget->inherits("QToolButton") ) && !findClient( WindowMatchPredicate( w )) ) if ( (!widget || qobject_cast<QToolButton*>(widget)) && !findClient( WindowMatchPredicate( w )) )
{ {
int x, y; int x, y;
Window xw; Window xw;