since the item takes ownership of its widget, get rid of it when it changes
svn path=/trunk/KDE/kdelibs/; revision=1185267
This commit is contained in:
parent
b3b18e5d7e
commit
0aa740d33b
@ -301,6 +301,7 @@ void ExtenderItem::setWidget(QGraphicsItem *widget)
|
||||
if (d->widget) {
|
||||
d->widget->removeSceneEventFilter(this);
|
||||
d->layout->removeItem(d->widget);
|
||||
d->widget->deleteLater();
|
||||
}
|
||||
|
||||
if (!widget || !widget->isWidget()) {
|
||||
|
@ -108,6 +108,7 @@ class PLASMA_EXPORT ExtenderItem : public QGraphicsWidget
|
||||
|
||||
/**
|
||||
* @param widget The widget that should be wrapped into the extender item.
|
||||
* It has to be a QGraphicsWidget.
|
||||
*/
|
||||
void setWidget(QGraphicsItem *widget);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user