Plasma theme cache auto-refresh

Kai Uwe Broulik kde at privat.broulik.de
Fri May 31 09:09:42 UTC 2013


Hi there,

as I've just commited a change to the battery icon, something came to my mind 
again:
Plasma uses a cache for its theme elements, and this cache is supposed to be 
automatically cleared when the theme metadata file is touched.
However, the transition to KDE SC 4.10 showed that this is not as reliable as 
we hoped it to be. My investigation showed, that when extracting a tar file, 
the file mtime is kept. This means:
The Plasma theme update was packaged in, say, March, and the used upgrades to 
SC 4.10 in April, and he probably changed some theme settings in the meantime. 
Now the modified time lies in April but the Metadata.desktop mtime is March, 
and so Plasma will not clear the cache and we get the mess we had recently.

My idea would be to also take in account the X-KDE-PluginInfo-Version of the 
metadata and force-clear the cache when the number changes. Whenever changes 
are made to the theme, the number should be increased. Isn't that what version 
numbers are for? :-)
Just something to keep in mind for Plasmsa 2.

Rainy greetings


More information about the Plasma-devel mailing list