[patch] KIconLoader: queryIcons() and queryIconsByContext()

Luke Sandell ls65594 at appstate.edu
Fri May 5 06:04:29 BST 2006

I found an annoying bug in KIconLoader. Normally, if you call loadIcon() or 
iconPath() with an extension in the icon name, removeIconExtension() will 
print a debug message. This behavior is fine. The problem is that 
queryIcons() and queryIconsByContext() call removeIconExtension() on every 
single file they find. This results in a long list of superfluous debug 
messages indicating that you are trying to load an icon by extension (which 
you're not).

My solution was to add a boolean parameter to removeIconExtension() indicating 
whether or not it should be "quiet," e.g. not print debug messages when a 
file containing an extension is passed to it. It is set to true when called 
from queryIcons*() but false when called from loadIcon() and iconPath().

Attached you will find a patch for the 3.5 branch, but it should be trivial to 
make the same changes to trunk as well.

-Luke Sandell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kiconloader.diff
Type: text/x-diff
Size: 2027 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060505/7c8b24db/attachment.diff>

More information about the kde-core-devel mailing list