From 32846f0e756aacabc1ee7988d6bd6747b0253762 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 15 Dec 2008 16:27:52 +0000 Subject: [PATCH] save immutability when it changes rather than on exit; prevents crashes from getting in the way BUG:177756 svn path=/trunk/KDE/kdelibs/; revision=897281 --- corona.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/corona.cpp b/corona.cpp index 274fbee22..b9f315df1 100644 --- a/corona.cpp +++ b/corona.cpp @@ -208,12 +208,6 @@ Corona::~Corona() // destroyed we don't try to transfer it to something that's already been // deleted. clearFocus(); - - KConfigGroup cg(config(), "General"); - - // we call the dptr member directly for locked since isImmutable() - // also checks kiosk and parent containers - cg.writeEntry("immutability", (int)d->immutability); delete d; } @@ -542,6 +536,13 @@ void Corona::setImmutability(const ImmutabilityType immutable) kDebug() << "setting immutability to" << immutable; d->immutability = immutable; d->updateContainmentImmutability(); + + KConfigGroup cg(config(), "General"); + + // we call the dptr member directly for locked since isImmutable() + // also checks kiosk and parent containers + cg.writeEntry("immutability", (int)d->immutability); + requestConfigSync(); } } // namespace Plasma