koIcon - what to keep in mind

Friedrich W. H. Kossebau kossebau at kde.org
Tue Aug 7 01:18:38 UTC 2012


Hi,

finally koIcon made it into master, yippie (IMHO). From now on it should be 
quite easy for anyone to check what icons are missing, now that all icon names 
are tagged with macros which can be extracted with gettext and compared 
against the existing icons.

But: this is not free lunch, as discussed. It needs everyone who adds new icon 
usages to also use the macros from KoIcon.h (besides in QML files, these are 
not covered, no proper idea yet how to tag without a footprint).

Basically you just need to remember this:

	KIcon("pretty_icon")   ->   koIcon("pretty_icon")

Should be doable by you, right? :P

In cases where just an icon name is to be set, use

	koIconName("pretty_icon")        to get a QString
	koIconNameCStr("pretty_icon")    to get a const char*

If you know the icon is missing, you can use the *Needed* variants of the 
macros, where you set a comment and can provide a temporary substitute.


There is a simple script in tools/iconcheck which ATM is to be used from the 
toplevel dir to get a list of missing/needed icons, like this:

	$ tools/iconcheck/iconcheck.py

The iconnames tagged with the koIconWanted macro are currently included in the 
script's output, seems a separate gettext run will be needed in the script to 
separate the needed from the just-wanted icons.
Everyone is invited to improve the script, it's just a simple start :)

And hurray for Tim and Yuri making the output of the script shorter already!

Cheers
Friedrich


More information about the kimageshop mailing list