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,17 +702,17 @@ bool ContainmentPrivate::showContextMenu(const QPointF &point, const QPoint &scr
//FIXME what if it's a handle? //FIXME what if it's a handle?
while (item) { while (item) {
applet = qgraphicsitem_cast<Applet*>(item); if (item->isWidget()) {
if (applet) { applet = qobject_cast<Applet*>(static_cast<QGrahpicsWidget*>(item));
if (applet->isContainment()) { if (applet) {
applet = 0; if (applet->isContainment()) {
applet = 0;
}
break;
} }
break;
}
// applet may have a value due to finding a containment! item = item->parentItem();
applet = 0; }
item = item->parentItem();
} }
KMenu desktopMenu; KMenu desktopMenu;