Static plugins and enable final

Dario Freddi drf54321 at gmail.com
Tue Jan 26 08:29:13 GMT 2010


On Tuesday 26 January 2010 00:04:44 Thiago Macieira wrote:
> Em Segunda-feira 25. Janeiro 2010, às 23.30.17, Dario Freddi escreveu:
> > On Monday 25 January 2010 23:13:03 Thiago Macieira wrote:
> > > Static plugins is discouraged.
> > >
> > > Long-term solution is to get rid of them.
> > >
> > > Static plugins is for applications built with static Qt. Since Qt is
> > >
> > >  static, it can't load a plugin that links to Qt. So the plugins are
> > >  built as a static libraries, which are linked to the target program.
> > >
> > > Static plugins were not meant for dynamic Qt, much less for dynamic
> > >
> > >  libraries.
> > >
> > > So please get rid of them, either by removing the plugin system and
> > > simply making the code part of the library, or by making it an actual
> > > plugin (an
> > >
> > >  .so file) that is loaded at run-time.
> >
> > I see. I'd prefer to keep the plugin system alive. What would you advise,
> > using dynamic qt plugins or going straight with KService? My situation is
> > that, as you can imagine, I have a single plugin to load, so I think it
> > would be better to go with the first.
> 
> If there's only one plugin ever, I recommend you remove the plugin system.
> Just make it part of the library and bypass all QPluginLoader code.

The matter is quite simple: having a (dynamic) plugin system would let me 
avoid linking kdecore to polkit/authorization services/etc, which is something 
some people would appreciate. Anyway, I'll probably go ahead and ditch the 
plugin system for now. For 4.5 we'll see, now the matter needs a fast and 
definitive solution.

> 
> > > In the mean time, what's wrong with the enable-final situation? Why is
> > > it a problem? What's the compile error?
> >
> > Simply that the import was disabled if KDE_ENABLE_FINAL was set,
> > basically not loading the plugin if kde was built with enable final. I
> > don't know how this might affect compilation.
> 
> It wasn't disabled when you added the code.
> 
> Someone added that #ifdef.
> 
> So the question is why. What was the issue they were trying to solve?

I know, in fact I discovered this like... yesterday. And I don't have a good 
answer.

> 

-- 
-------------------

Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100126/30452c57/attachment.sig>


More information about the kde-core-devel mailing list