reparent before deleting the dialog, or the widget gets deleted

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=874911
This commit is contained in:
Marco Martin 2008-10-22 18:51:59 +00:00
parent fdbafa0337
commit 1facd63fcc

View File

@ -54,6 +54,7 @@ PopupApplet::PopupApplet(QObject *parent, const QVariantList &args)
PopupApplet::~PopupApplet()
{
delete widget();
delete d;
}
@ -167,6 +168,10 @@ void PopupAppletPrivate::popupConstraintsEvent(Plasma::Constraints constraints)
dialog->layout()->removeWidget(qWidget);
}
if (qWidget) {
qWidget->setParent(0);
}
delete dialog;
dialog = 0;
}