deleteLater is safer. doh.

svn path=/trunk/KDE/kdelibs/; revision=941579
This commit is contained in:
Chani Armitage 2009-03-20 00:23:21 +00:00
parent 04b65db3c8
commit 73073b7a54

View File

@ -134,7 +134,7 @@ void ToolBox::updateToolBox()
{ {
Plasma::IconWidget *tool = qobject_cast<Plasma::IconWidget *>(sender()); Plasma::IconWidget *tool = qobject_cast<Plasma::IconWidget *>(sender());
if (tool && tool->action() == 0) { if (tool && tool->action() == 0) {
delete tool; tool->deleteLater();
tool = 0; tool = 0;
} }
@ -157,7 +157,7 @@ void ToolBox::removeTool(QAction *action)
Plasma::IconWidget *tool = dynamic_cast<Plasma::IconWidget*>(child); Plasma::IconWidget *tool = dynamic_cast<Plasma::IconWidget*>(child);
if (tool && tool->action() == action) { if (tool && tool->action() == action) {
//kDebug() << "tool found!"; //kDebug() << "tool found!";
delete tool; tool->deleteLater();
break; break;
} }
} }