Review Request: Add "QString iconName()" method to KIcon
Olivier Goffart
ogoffart at kde.org
Tue Apr 13 21:31:29 BST 2010
Le Tuesday 13 April 2010, Aurélien Gâteau a écrit :
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3585/
> -----------------------------------------------------------
>
> Review request for kdelibs, Marco Martin and Hamish Rodda.
>
>
> Summary
> -------
>
> This patch is a necessary step for dbusmenu [1]: To be able to export a
> menu over dbus, we need to know the name of the icons, thus the need for a
> "QString KIcon::iconName()" method.
>
> As you can see in the code comment, I am not really happy with the way it
> is implemented, but do not see any other way.
Indeed. This is not quite nice. And there is no real way you can get better.
Wait...
There was a Merge Request to Qt to add a QIcon::engine() function, but i
cannot find back. Maybe it is time to merge it
Another idea would be to add a virtual QIconEngineV3::name() function (or make
use of the virtual hook), and have a QIcon::name() (that would also work
with QIcon::fromTheme())
>
> [1] http://people.canonical.com/~agateau/dbusmenu/
>
>
> Diffs
> -----
>
> trunk/KDE/kdelibs/kdeui/icons/kicon.h 1114121
> trunk/KDE/kdelibs/kdeui/icons/kicon.cpp 1114121
>
> Diff: http://reviewboard.kde.org/r/3585/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Aurélien
More information about the kde-core-devel
mailing list