[Interest] Getting at the metadata (or simply the file names) of currently loaded plugins

René J. V. Bertin rjvbertin at gmail.com
Thu Dec 28 19:16:25 CET 2017


Thiago Macieira wrote:


>> Which also explains why the built-in styles don't show up because they're in
>> a shared library?
> 
> Those would also be staticplugins. If they are compiled into a library or the
> executable, as opposed to a dynamically-loaded module, they're staticplugins.

Hmm, so the staticplugins list should contain the fusion, windows and macintosh 
styles, but as I said it was empty. Curious but not a priority ATM.


>> I'm a bit surprised though that this is so difficult. Plugin metadata is a
>> special case of QObject metadata, no? I can't find any methods to query that
>> information (except via QPluginLoader for plugins), why is that?
> 
> No. It's a special section in the executable so that QLibrary can find it
> without loading the actual library. Then we read in the binary JSON that is
> stored there.

Well, obviously that data is also stored in the plugin file in a way that the 
plugin loader can find and use it. So I guess it could be both.

Either way it's a lot more straightforward to use the 
QPlatformNativeInterface::NativeResourceForIntegrationFunction mechanism for 
what I wanted to achieve, esp. if the target QPA already has one that can be 
extended.

Thanks,
R.




More information about the Interest mailing list