DataEngine & KPluginFactory

Sebastian Kügler sebas at kde.org
Mon Jul 1 12:41:18 UTC 2013


On Monday, July 01, 2013 14:35:51 Kevin Krammer wrote:
> > Well, the goal, for me, is to make plugin factories work. Right now, we
> > only have a handful constructor, and I want to make it possible to build
> > those with as little extra hassle as possible -- it means porting all
> > plugins, and that's a lot already, even if it's just moving a macro into
> > the header file.
> >
> > 
> >
> > I think we can make arbitrary ctors for plugins possible, but as I said,
> > those would then just not use this macro, but supply their own macro that
> > does the setup of the KPluginFactory instance.
> 
> But wouldn't it be more viable to be able to share the macro for the header 
> code part between all plugins instead of having the common parts replicated
> a lot?
> 
> I.e. K_PLUGIN_HEADER only creating the header part of the plugin and, if 
> really necessary, K_PLUGIN_SOURCE creating one possible implementation for 
> create()?
> 
> That way K_PLUGIN_HEADER can always be used to create all the boilerplate 
> code, K_PLUGIN_SOURCE (or whatever) providing an opt-in convenience for 
> certain plugins but not limiting K_PLUGIN_HEADER's universality?

Sure, we can easily do that. :)
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Kde-frameworks-devel mailing list