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

Michael Pyne michael.pyne at kdemail.net
Sat May 6 06:32:09 BST 2006


On Friday 05 May 2006 11:01, Luke Sandell wrote:
> Michael Pyne wrote:
> > I like the idea, but I don't like the way it's implemented.  It's like
> > adding
> > a "no, I'm being an idiot on purpose" flag to a public API.
>
> Actually removeIconExtension() is currently a private member function. If
> you want to make it public, and I think that it useful enough that it
> should be public, then I can see your point (actually it should be static
> as well).

Good point.  Yes, this should probably be changed for KDE 4 to be public and 
static.  Better to leave it private for KDE 3.

> However, if this is the case, then we'd better not have it print 
> warnings to the user (after all, they know their icon has an extension,
> that is why they're calling the function).

Also agreed.

> > We would then be able to transition the internal uses of
> > removeIconExtension() in queryIcons() to the
> > internalRemoveIconExtension(), and there would be no code duplication.
>
> Actually queryIcons() and queryIconsByContext() would still use
> removeIconExtension() (no warnings) whereas the all internal calls would
> use removeIconExtensionInternal() (warnings).

Yes, the fact that I thought removeIconExtension() was public confuses things 
but you have figured out what I had in mind.

> If you agree with my points, I will make a patch.

Sounds good.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060506/e75605fd/attachment.sig>


More information about the kde-core-devel mailing list