Static plugins and enable final

Thiago Macieira thiago at kde.org
Mon Jan 25 23:04:44 GMT 2010


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.

> > 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?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100126/cb7f768e/attachment.sig>


More information about the kde-core-devel mailing list