[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 11:08:30 CET 2017


Thiago Macieira wrote:

> Remember: staticplugins are not plugins.

Actually, I couldn't remember that. The name suggested they might, but the 
documentation doesn't (at least what I read of it).
> They are regular, static
> libraries whose only access point is via the plugin loader mechanism.

Which also explains why the built-in styles don't show up because they're in a 
shared library?

> If you poke through the internals of QPluginLoader, you'll find it. See the
> QLibraryStore global static instance in qlibrary.cpp.

I started doing that, traced the metadata getter to a rawMetaData symbol which 
is a QtPluginMetaDataFunction which is a function pointer, and got lost there.


I'll have a look at qlibrary.cpp and see if that gets me where I want though I 
guess that would oblige me to trawl the plugin directory myself to enumerate all 
plugins of potential interest.
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?



Meanwhile I'm trying to approach my experiment in a different way, via a custom 
platform integration function in the QPA plugin. I should have thought of that 
at once :)

R.




More information about the Interest mailing list