it's not safe to delete the layout directly

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=771845
This commit is contained in:
Chani Armitage 2008-02-07 01:58:48 +00:00
parent ed47acc7a0
commit 613d5ef850

View File

@ -616,7 +616,7 @@ void Applet::setFailedToLaunch(bool failed, const QString& reason)
d->failureText = 0;
qDeleteAll(QGraphicsItem::children());
delete layout();
setLayout(0);
if (failed) {
setDrawStandardBackground(true);
@ -653,7 +653,7 @@ void Applet::setNeedsConfiguring(bool needsConfig)
d->needsConfig = needsConfig;
prepareGeometryChange();
qDeleteAll(QGraphicsItem::children());
delete layout();
setLayout(0);
if (needsConfig) {
setDrawStandardBackground(true);
@ -668,7 +668,7 @@ void Applet::setNeedsConfiguring(bool needsConfig)
void Applet::performSetupConfig()
{
qDeleteAll(QGraphicsItem::children());
delete layout();
setLayout(0);
showConfigurationInterface();
}