Re: how to use the cache-to-disk feature in Wallpaper

2009-04-13 Thread Aaron J. Seigo
On Monday 13 April 2009, Benoit Jacob wrote: > Btw, plasmawallpaperviewer has been very useful for valgrinding my > wallpaper. I could never valgrind plasma-desktop as it's far too > heavy. shortening the round trips between development and testing (and then developer some more ;), isolation by r

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-13 Thread Benoit Jacob
2009/4/13 Aaron J. Seigo : > On Monday 13 April 2009, Benoit Jacob wrote: >> // remove old image from cache >> kDebug() << "remove " << m_cacheKey; >> insertIntoCache(m_cacheKey, QImage()); > > fixed in svn; what was happening was that a kio job was being created while > the app was being destroyed

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-13 Thread Aaron J. Seigo
On Monday 13 April 2009, Benoit Jacob wrote: > // remove old image from cache > kDebug() << "remove " << m_cacheKey; > insertIntoCache(m_cacheKey, QImage()); fixed in svn; what was happening was that a kio job was being created while the app was being destroyed ... so it would never hit the event

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-13 Thread Benoit Jacob
oops, sent too fast. sorry for the spam. It remains that my way of triggering save() was "kquitapp plasma". So in every case, my problem arises when Mandelbrot is about to be destroyed. 2009/4/13 Benoit Jacob : > By the way the committed code does this from save(), not from the > destructor, so t

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-13 Thread Benoit Jacob
By the way the committed code does this from save(), not from the destructor, so this wasn't where to look for an explanation. Cheers, Benoit 2009/4/13 Benoit Jacob : > this is now committed, as a testcase... > > Example of console output: > > plasma-desktop(7077) Mandelbrot::updateCache: remove

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-13 Thread Benoit Jacob
this is now committed, as a testcase... Example of console output: plasma-desktop(7077) Mandelbrot::updateCache: remove "mandelbrot-157422800" Corresponding to this code: // remove old image from cache kDebug() << "remove " << m_cacheKey; insertIntoCache(m_cacheKey, QImage()); Yet the file st

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-12 Thread Benoit Jacob
I have a problem, I wonder if I'm hitting a bug. It seems as if insertIntoCache(key, QImage()) does not do anything when it is called from ~Mandelbrot(). The expected behavior was to remove the image corresponding to 'key' from the cache. I have really checked that the key is correct and that isU

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-12 Thread Benoit Jacob
2009/4/12 Aaron J. Seigo : > if you have 3 containments with the same image as the wallpaper, it shouldn't > create three cache files on disk. so there is no real mapping from cache file > to containment; there is a mapping of sorts between wallpaper plugins and the > cache file they are using ...

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-12 Thread Aaron J. Seigo
On Sunday 12 April 2009, Benoit Jacob wrote: > (***) > Plasma::Wallpaper should remember for each cached image it's > "context": that is (i guess), which containment it belongs to. That > could be either stored in the filename, or by storing in different > sub-directories. if you h

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-12 Thread Benoit Jacob
2009/4/10 Aaron J. Seigo : > papers (maybe i should add that bookkeeping into Wallpaper itself? H.. > yes, probably... "let me get back to you on that one," he says, again.) ok: caching is now implemented in Mandelbrot (r952792). Here's again a somewhat lengthy email but you can skip to (

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-10 Thread Benoit Jacob
Update: I hadn't seen revision 952060... very useful detail indeed! So there's no need for removeFromCache. Thanks, Benoit 2009/4/11 Benoit Jacob : > 2009/4/10 Aaron J. Seigo : >> On Friday 10 April 2009, Benoit Jacob wrote: >>> I did setUsingDiskCache(true); in the constructor, and I emit >> >

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-10 Thread Benoit Jacob
2009/4/10 Aaron J. Seigo : > On Friday 10 April 2009, Benoit Jacob wrote: >> I did setUsingDiskCache(true); in the constructor, and I emit > > when you are ready to cache the image, you can now call: > > insertIntoCache(const QString& key, const QImage &image); > > and if you want to see if it exis

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-10 Thread Aaron J. Seigo
On Friday 10 April 2009, Benoit Jacob wrote: > I did setUsingDiskCache(true); in the constructor, and I emit when you are ready to cache the image, you can now call: insertIntoCache(const QString& key, const QImage &image); and if you want to see if it exists and retrieve it call: bool findInCa

Re: how to use the cache-to-disk feature in Wallpaper

2009-04-10 Thread Aaron J. Seigo
On Friday 10 April 2009, Benoit Jacob wrote: > I did setUsingDiskCache(true); in the constructor, and I emit > renderCompleted once my image has finished rendering, but that doesn't > make any difference. dang, i just KNEW someone would want to do this eventually ;P right now it's all pretty inte