[Development] Q_PLUGIN_METADATA documentation

Alan Alpert 416365416c at gmail.com
Tue Jun 25 04:57:57 CEST 2013


On Fri, Jun 21, 2013 at 3:14 PM, Lorn Potter <lorn.potter at gmail.com> wrote:
> Hi *,
>
> While working on QTBUG-31900, there was a change in qtbase - 732dcfe7
> which broke loading of sensorgesture plugins.
>
> It turns out, the plugin loader is now only loading the first
> sensorgesture plugin found.
>
> If I remove the FILE portion of the Q_PLUGIN_METADATA entry they all
> load and tests pass.
> The json file for all sensorgestures plugins contains the same thing:
>   { "Keys": [ "notused" ] }
> This has been working fine since 5.0
>
> The documentation here:
> http://qt-project.org/doc/qt-5.0/qtcore/qtplugin.html#Q_PLUGIN_METADATA
>
> says nothing about the contents of the json file, what is possible for
> it to contain, what it should contain, or even it's purpose.

AFAIK, the JSON file is there to provide plugin specific meta-data
which can be queried without dlopen. It's use is optional and only
there for plugins need it. I usually write my plugins without a JSON
file because they don't need one. No problems so far...

> The example mentioned there only refers back to this page.
>
> Can someone explain this? and perhaps beef up that documentation?

I have no real idea how it works, I just use it occasionally ;) . But
more documentation from those who know would be nice.

--
Alan Alpert



More information about the Development mailing list