thought i committed this yesterday; apparently not.. safer handle clearing.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833352
This commit is contained in:
Aaron J. Seigo 2008-07-16 17:51:58 +00:00
parent 7cb619cf68
commit 9fa78a4688

View File

@ -1075,10 +1075,12 @@ void ContainmentPrivate::toggleDesktopImmutability()
}
if (q->immutability() != Mutable) {
foreach (AppletHandle* handle, handles) {
QMap<Applet*, AppletHandle*> h = handles;
handles.clear();
foreach (AppletHandle* handle, h) {
handle->deleteLater();
}
handles.clear();
}
//setLockToolText();
@ -1160,8 +1162,10 @@ void ContainmentPrivate::triggerShowAddWidgets()
void ContainmentPrivate::handleDisappeared(AppletHandle *handle)
{
handles.remove(handle->applet());
handle->deleteLater();
if (handles.contains(handle->applet())) {
handles.remove(handle->applet());
handle->deleteLater();
}
}
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constraints)