don't use qgraphicsitem_cast, + some cleanup
svn path=/trunk/KDE/kdelibs/; revision=1017490
This commit is contained in:
parent
22506da412
commit
f725121a2a
@ -702,7 +702,8 @@ 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()) {
|
||||||
|
applet = qobject_cast<Applet*>(static_cast<QGrahpicsWidget*>(item));
|
||||||
if (applet) {
|
if (applet) {
|
||||||
if (applet->isContainment()) {
|
if (applet->isContainment()) {
|
||||||
applet = 0;
|
applet = 0;
|
||||||
@ -710,10 +711,9 @@ bool ContainmentPrivate::showContextMenu(const QPointF &point, const QPoint &scr
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// applet may have a value due to finding a containment!
|
|
||||||
applet = 0;
|
|
||||||
item = item->parentItem();
|
item = item->parentItem();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
KMenu desktopMenu;
|
KMenu desktopMenu;
|
||||||
//kDebug() << "context menu event " << (QObject*)applet;
|
//kDebug() << "context menu event " << (QObject*)applet;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user