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; d->failureText = 0;
qDeleteAll(QGraphicsItem::children()); qDeleteAll(QGraphicsItem::children());
delete layout(); setLayout(0);
if (failed) { if (failed) {
setDrawStandardBackground(true); setDrawStandardBackground(true);
@ -653,7 +653,7 @@ void Applet::setNeedsConfiguring(bool needsConfig)
d->needsConfig = needsConfig; d->needsConfig = needsConfig;
prepareGeometryChange(); prepareGeometryChange();
qDeleteAll(QGraphicsItem::children()); qDeleteAll(QGraphicsItem::children());
delete layout(); setLayout(0);
if (needsConfig) { if (needsConfig) {
setDrawStandardBackground(true); setDrawStandardBackground(true);
@ -668,7 +668,7 @@ void Applet::setNeedsConfiguring(bool needsConfig)
void Applet::performSetupConfig() void Applet::performSetupConfig()
{ {
qDeleteAll(QGraphicsItem::children()); qDeleteAll(QGraphicsItem::children());
delete layout(); setLayout(0);
showConfigurationInterface(); showConfigurationInterface();
} }