K3Icon killed - Commit ?

Rafael Fernández López ereslibre at gmail.com
Mon Oct 1 00:09:48 BST 2007


Hi all,

I have everything compiling and working. The ppatch is only for the
kdelibs/kdeui/icons folder diff, the rest of the commits are for adaptation
from K3Icon:: to KIconLoader:: and similars.

You can find it on:
http://media.ereslibre.es/2007/10/kdelibs-kdeui-icons.diff

What needs to be explained is that K3Icon contained some information, but
almost always the stuff was used like:

if (icon.isValid())
   doSomethingWith(icon.path);

So, now, when we were returning a K3Icon, we return a QString. When this
string is null (QString()) is like the icon wasn't valid, and when this
string is not null, it contains the path of the icon.

Please review some magic changes done at KIconLoader::loadIcon(). I think
I've done correctly but I'd like someone familiar with this code to double
check it. Specially:

         // No? load it.
-        K3Icon icon;
+        QString icon;
         if (absolutePath && !favIconOverlay)
         {
-            icon.context=K3Icon::Any;
-            icon.type=K3Icon::Scalable;
-            icon.path=name;
+            iconType=Scalable;
+            icon=name;
         }

and

-        iconType = icon.type;
-        iconThreshold = icon.threshold;
-        path = icon.path;
+        iconThreshold = 0;
+        path = icon;

I haven't ever seen iconThreshold being changed...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071001/e540161f/attachment.htm>


More information about the kde-core-devel mailing list