[Kde-pim] [PATCH] Export scriptable slots in AgentBase

Volker Krause vkrause at kde.org
Thu Oct 9 12:39:14 BST 2008


On Thursday 09 October 2008 12:13:20 Kevin Krammer wrote:
> On Wednesday 08 October 2008, Sebastian TrĂ¼g wrote:
> > May I commit the attached patch? It makes AgentBase export scriptable
> > slots. Thus, simple DBus interfaces can be created by marking slots with
> > Q_SCRIPTABLE.
>
> I am a bit worried that this might change how one of our standard
> interfaces look like at runtime introspection for that agent.
>
> Some D-Bus bindings create interface/proxy classes through introspection on
> first encounter and could end up with one that actually only applies to one
> specific agent not to all like it would suggest.
>
> I think you can still export the main object's slots without doing a
> separate adaptor by registering it a second time on a different path, i.e.
>
> QDBusConnection::sessionBus().resisterObject( "/AgentName", this,
> QDBusConnection::ExportScriptableSlots );

That's IMHO the preferred way, no hidden magic, less likely any side-effects 
and more control for the actual agent implementation. And just one line of 
code.

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20081009/362dcfdf/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list