KIcon / KIconEngine

Michaël Larouche michael.larouche at
Sun Mar 19 13:27:09 GMT 2006

Le March 19, 2006 00:18, Hamish Rodda a écrit :
> Hi,
> With the new one-icon-per-action-only design, there were troubles with
> loading the correct size of icon to display for an action.  (To be fair,
> this was partly due to KIconLoader still using QPixmaps).
> As a solution, I've created two new classes, KIcon and KIconEngine, and
> renamed the old KIcon to K3Icon.  Some of these changes have been discussed
> on the mailing list before, but I just wanted to run them past everyone for
> comment before committing.
> I've not included the whole patch, because most of the KIcon -> K3Icon diff
> is pretty mundane.  Instead, please find attached the new files, and the
> diff to kaction which allows the old deprecated way of setting icon names
> also use the new KIcon system.  One side effect of the patch is that it is
> not possible to get the kde icon name back from a kaction or qicon/kicon,
> because QIcon does not provide public access to the QIconEngine it uses.  I
> don't see this as a problem though.
> At the moment the patch is suboptimal because KIcon should look to see if
> we have already created a corresponding KIconEngine for the specified icon
> name. This can be added later however.  Also planned for future development
> is switching KIconLoader to just supply file names, and have KIconEngine do
> the loading of the icon and (in the case of vector graphics) rendering as
> required.
> I'd like this to go in before the next snapshot, so those porting to the
> new KAction can also provide a KIcon("iconname") instead of using
> deprecated constructors or the deprecated setIconName().
> Cheers,
> Hamish.

Why KIconEngine use a enum defined in K3Icon ?
Michaël Larouche
KDE developer working on Kopete, Kamefu, Solid...on dial-up :P
MSN/Email: michael.larouche at
IRC: on #kopete,#solid,#kamefu,#plasma
Jabber: darkshock at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list