How to do post-4.0 icon naming changes

Hans Meine hans_meine at
Sun Jan 20 14:00:24 GMT 2008

On Dienstag 15 Januar 2008, David Faure wrote:
> > (c), if performed as pure renaming without further measures to be taken,
> > will break icons that work fine in 4.0. Which is probably not a good idea
> > in terms of backwards compatibility. Apart from that, benefits galore.
> >
> > My personal preference would be (c) with some smart mechanism that shows
> > icons when they are requested but not in the icon dialog or among valid
> > icons in the theme folder... that would need some smart-ass code
> > solution, though. (Ideas on how to do that are highly appreciated!)
> It doesn't need to be "smart-ass" :), but a simple mapping file could be
> read by KIconLoader in order to keep behavior compatibility indeed.
> Just a file with
> kde-4.0-icon-name kde-4.1-icon-name
> kde-4.0-icon-name kde-4.1-icon-name
> ...
> and a QHash<QString,QString> in the code.

Note that this would only work if you update the code and all icon themes 
along.  If 3rd party icon themes are installed, the new code sketched above 
would not pick up the icons anymore; you'd need to do:

// requires reverse mapping from new->old names:
in every dir searched for the icon:
  look for new name
  if not found, look for old name

Otherwise, one could require the icon themes to be updated and/or equipped 
with [sym]links or copies of the files.

Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list