kde-core-devel@kde.org
[Top] [All Lists]

Re: KActionCollection: it's a jungle

Subject: Re: KActionCollection: it's a jungle
From: Andreas Hartmetz
Date: Sun, 18 Mar 2007 13:10:09 +0100
Am Sonntag, 18. MÃrz 2007 07:04:31 schrieb Aaron J. Seigo:

> > * addDocCollection
> >  a)huh?, b) used in one case in KHelpCenter. Can't be that useful.
>
> looking at the code, it seems that the intention is to make it so that you
> can load a document with associated actions and add those actions to the
> application. however, if the application already has an action by the same
> name, then the app's action masks the doc's action. essentially, this seems
> to allow a doc to add unique actions to the view without clobbering the
> view's actions in the process.
>
> sounds reasonable to me. that it's used only once makes it a bit odd to
> have that feature in kdelibs, but it does seem like the most elegant place
> for it.
>
I did read the code, too. Yes, I probably dislike the name more than the 
functionality...
Let's rename it to addOverlayCollection(*) - that way, no confusion when 
reading the documentation and people that need this function *will actually 
find and use it*. It goes without saying that the documentation needs to be 
improved.

(*) Mechanism, not policy, as they say. Document what it can do, not how you 
are supposed to use it.

<Prev in Thread] Current Thread [Next in Thread>