look up in the parent hyerarchy rather than parentItem

svn path=/trunk/KDE/kdelibs/; revision=1033106
This commit is contained in:
Marco Martin 2009-10-09 13:40:33 +00:00
parent e67e058087
commit 189618d2e4

View File

@ -111,9 +111,9 @@ void DialogPrivate::themeChanged()
if (extender) {
applet = extender->d->applet;
} else if (graphicsWidget) {
QGraphicsItem *pw = graphicsWidget;
QObject *pw = graphicsWidget;
while (pw = pw->parentItem()) {
while (pw = pw->parent()) {
applet = dynamic_cast<Plasma::Applet *>(pw);
if (applet) {
break;