[Development] Let's discuss QPluginManager

d3fault d3faultdotxbe at gmail.com
Sun Jan 22 20:11:36 CET 2012


Have you looked at the Qt Service Framework? It's new to 5.0. Doc:
http://doc.qt.nokia.com/5.0-snapshot/service-frameworks.html . Here is an
example app demonstrating it's usage:
http://doc.qt.nokia.com/5.0-snapshot/servicebrowser.html .


> *Hi,*
>
> *Qt nicely supports extending applications and libraries via plugins,*
> *still in my opinion one major building block is missing: Some reusable*
> *object which iterates the shared object files in relevant plugin folders*
> *and returns all instances implementing a given set of interfaces. This*
> *seems a pretty common task.*
>
> *Just had to think about implementing such a thing today. Yes, once*
> *again. Actually rather wondered from where to copy-and-paste it: I've*
> *stopped counting how many of them I touched during the last two years.*
> *Something that's even worse than the need of copy-and-paste: Most of*
> *them were created with some kind of ad-hoc mentality, so of course most*
> *of them are highly inefficient, if not even plainly broken.*
>
> *Hope you still reading and got somewhat hooked. Also hope you agree we*
> *need something like QPluginManager, so let's discuss the feature set it*
> *should have:*
>
> *     1. Iterate relevant plugin folders to find plugins implementing a*
> *        given set of QObject interfaces.*
>

Possible, though you'd need some custom code.


> *     2. Introspect as few plugin files as possible to keep application*
> *        startup time low. This could be done by caching the interfaces*
> *        each plugin file provides.*


Possible, it will only introspect what you tell it to introspect.


>
> *     3. Do we need meta informations like vendor name, description or*
> *        dependencies? Think of QtCreator's .pluginspec files.*
>

You can load services (plugins) by vendor name and/or service description,
but I don't think there's any dependency resolution to be found.


>
> *Once we figured out the needed feature set, we should figure out how to*
> *implement the object. Most importantly: Is there some code, are there*
> *some specifications we could reuse?*
>
> *Guess this should be enough to get the discussion started.*
>
> *Thank you,*
> *Mathias*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120122/fa98bb02/attachment.html>


More information about the Development mailing list