Cast the parent being checked rather than parentItem()

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=743922
This commit is contained in:
Jason Stubbs 2007-12-02 11:19:26 +00:00
parent 220094f3a8
commit 89a387b76d

View File

@ -298,7 +298,7 @@ Widget *Widget::parent() const
QGraphicsItem *parent = parentItem();
while (parent) {
Widget *parentWidget = dynamic_cast<Widget *>(parentItem());
Widget *parentWidget = dynamic_cast<Widget *>(parent);
if (parentWidget) {
return parentWidget;