How to set Q_PLUGIN_METADATA when a plugin supports several interfaces.
-
Supposing I have the following interfaces iid in a application that can be extended through plugins
#define Interface1_iid “myorganisation.com.application.interface1_rev_1.0” #define Interface2_iid “myorganisation.com.application.interface2_rev_2.0”
In an earlier version of the application Interface2 was declared as revision 1.0
Now supposing I have a plugin that supports several interfaces:
class thisPlugin : public Q_OBJECT, public Interface1, public Interface2 { Q_OBJECT Q_PLUGIN_METADATA(???) Q_INTERFACES(Interface1 Interface2)
How I am supposed to set Q_PLUGIN_METADATA if the plugin is supporting Interface1 in revision 1.0 and Interface2 in revision 2.0 ... note that I might have an older version of the plugin that is supporting Interface1 in revision 1.0 and Interface2 in revision 1.0
The Q_PLUGIN_METADATA macro needs to declare the IID of the interface implemented through the object, and reference a file containing the meta data for the plugin. Problem is that the plugin supports 2 interfaces and that the macro can declare only 1 IID from one of both interfaces. Also there should be exactly one occurrence of the Q_PLUGIN_METADATA macro in the source code for a Qt plugin.
-
Hi and welcome to devnet,
I'd recommend bringing this topic to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.