extragear/sdk/kdevplatform

Andreas Pakulat apaku at gmx.de
Sat Feb 20 16:02:57 UTC 2010


On 20.02.10 13:45:50, David Nolden wrote:
> Am Samstag 20 Februar 2010 11:09:51 schrieb Alexander Dymo:
> > 2010/2/20 Andreas Pakulat <apaku at gmx.de>:
> > >> +    virtual void showQuickOpen( const QStringList &types ) = 0;
> > >
> > > Can we please use an enum for this instead of a stringlist without any
> > > type-checking. I know its a plain stringlist in the implementation, but
> > > at least the public API should be sane.
> > 
> > The problem is that apart from known types that can be listed in the
> > enum (functions, classes, files) any plugin can register its own type
> > and a handler/dataprovider for that.
> > These types should be of course combinable with others and they should
> > never clash.
> > 
> > Do you know how this problem is solved or maybe a place in KDE code
> > where to look for the solution?
> > 
> > 
> > So far the only thing which comes to mind is this:
> > IQuickOpen::registerProvider() calculates the next enum value and
> > returns an integer for the caller
> > Caller (Ruby switchers code) stores that integer and uses it.
> > 
> > I'm interested whether this "calculate the next enum value" task is
> > already solved somewhere.
> 
> Or we solve it the simple way, and keep it as it is.

Yes, knowing a bit more of the background that seems to be most feasible
method. But could we have public constants for the "widely-known" cases
of function,class and files, so that plugins don't hardcode the string
value when using this function?

Andreas

-- 
You have taken yourself too seriously.




More information about the KDevelop-devel mailing list