Convenience macro do use Extension interfaces

Andreas Pakulat apaku at gmx.de
Sat Mar 24 01:12:37 UTC 2007


On 23.03.07 23:39:27, Andreas Pakulat wrote:
> On 15.02.07 18:14:37, David Nolden wrote:
> > Ok, I've done a sketch that should nearly work, but I don't have time to 
> > complete and/or test it(it probably won't compile).
> > Also I don't know exactly enough how the extension-interface stuff works and 
> > what the exact use-cases are, but I hope it isn't all too much work to finish 
> > it. I haven't constructed the macro itself, but the code that should do the 
> > work behind it. The question is whether Q_TYPEID works as I hope it 
> > works(with templates and such).
> > 
> > greetings, David
> 
> > //All this can only work if Q_TYPEID is able to work with templates(Q_TYPEID(GetOneLeft<Interfaces>::Result) should return the string for the actual type, not "GetOneLeft<Interfaces>::Result"). Else another solution needs to be found.
> 
> Well, all what Q_TYPEID does with that is putting
> 
> QLatin1String(GetOneLeft<Interfaces>::Result_iid)
> 
> at the place where the macro is called. I'll see if that works or not.

Well, I didn't try it out. I posted this on IRC and the immediate
reaction was: Don't use that in KDevelop, its nearly unmaintainable
because its hard to understand unless you're a template guru.

Now, while I do understand what the code does, I wouldn't be able to fix
any of the template-list-stuff myself.

Luckily I just had an idea that is much much simpler, based on the fact
that we only need the type id to register a factory for an interface and
later on we only need the type id to decide wether a given QObject
implements an interface.

Andreas

-- 
It's a very *__UN*lucky week in which to be took dead.
		-- Churchy La Femme




More information about the KDevelop-devel mailing list