don't use qgraphicsitem_cast, + some cleanup

svn path=/trunk/KDE/kdelibs/; revision=1017490
This commit is contained in:
Chani Armitage 2009-08-30 18:51:58 +00:00
parent 22506da412
commit f725121a2a

View File

@ -702,7 +702,8 @@ bool ContainmentPrivate::showContextMenu(const QPointF &point, const QPoint &scr
//FIXME what if it's a handle?
while (item) {
applet = qgraphicsitem_cast<Applet*>(item);
if (item->isWidget()) {
applet = qobject_cast<Applet*>(static_cast<QGrahpicsWidget*>(item));
if (applet) {
if (applet->isContainment()) {
applet = 0;
@ -710,10 +711,9 @@ bool ContainmentPrivate::showContextMenu(const QPointF &point, const QPoint &scr
break;
}
// applet may have a value due to finding a containment!
applet = 0;
item = item->parentItem();
}
}
KMenu desktopMenu;
//kDebug() << "context menu event " << (QObject*)applet;