Mandelbrot ready for review, config bugs

Aaron J. Seigo aseigo at kde.org
Tue Apr 7 20:06:23 CEST 2009


On Tuesday 07 April 2009, Benoit Jacob wrote:
> However before moving it to kdereview let's discuss the following bug
> as I don't know if it is in my code or in libplasma.
> The bug is that the config isn't saved when it should, so is often lost:
> 1) when changing the mandelbrot settings in "Desktop Settings", the
> setting in question is well updated, but the rest of the config is
> lost (i.e. the viewpoint is reinitialised)
> 2) when doing "kquitapp plasma_desktop" the config is also lost.

what are in the contents of the plasma-desktop-appletsrc for the mandelbrot 
paper?

also note that in init(), you can check for isInitialized() to see if it is 
the first time through or not, in case you need to do something different in 
init() when its called for a second time (which happens after configuration, 
as it does a save() then a restore() which calls init())

> I have implemented Mandelbrot::save(). Looking at the Pattern
> wallpaper, it looks like that's all I have to do? at least, Pattern
> seems to only implement save() and doesn't seem to ever call save()
> manually.

yes, you don't need to call save manually; you may want to emit 
configNeedsSaving() on configuration changes to force flushing to disk 
immediately.

ah, looking at the code, you also don't need to check a variable before 
deleting it:

if(m_image) delete m_image;

is equivalent to just:

delete m_image;

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090407/208ec3d7/attachment.sig 


More information about the Plasma-devel mailing list