From f725121a2a520661c40d94ccfa40182aa3cb0287 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Sun, 30 Aug 2009 18:51:58 +0000 Subject: [PATCH] don't use qgraphicsitem_cast, + some cleanup svn path=/trunk/KDE/kdelibs/; revision=1017490 --- containment.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/containment.cpp b/containment.cpp index 8dce8377e..492a4593a 100644 --- a/containment.cpp +++ b/containment.cpp @@ -702,17 +702,17 @@ bool ContainmentPrivate::showContextMenu(const QPointF &point, const QPoint &scr //FIXME what if it's a handle? while (item) { - applet = qgraphicsitem_cast(item); - if (applet) { - if (applet->isContainment()) { - applet = 0; + if (item->isWidget()) { + applet = qobject_cast(static_cast(item)); + if (applet) { + if (applet->isContainment()) { + applet = 0; + } + break; } - break; - } - // applet may have a value due to finding a containment! - applet = 0; - item = item->parentItem(); + item = item->parentItem(); + } } KMenu desktopMenu;