Results 1 to 9 of 9

Thread: Marshaling classes with QtDBus

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Marshaling classes with QtDBus

    Hi, this is my first post here.
    Sorry if my english is too bad.

    I've write an xml interface for DBus, and it working perfectly when I use a primitive type or a Qt predefined signature (some as "as" or "s").

    Because I want to use some object not defined by Qt4 I've implemented a new class, I've register it with Q_DECLARE_METATYPE, qRegisterMetaType and qDBusRegisterMetaType, so I've overloaded the operator << and >> for QDBusArgument and my type.
    I've change the signature in the xml and I've insert an annotation (for qdbusxml2cpp) like this:

    Qt Code:
    1. <annotation name="com.trolltech.QtDBus.QtTypeName.Out0"
    2. value="DBusReturn"/>
    To copy to clipboard, switch view to plain text mode 

    DBusReturn is my object

    So, if I execute qdbusviewer and call the function I have an error message saying that the function don't exist.

    I've think that this is a problem of qdbusviewer, that don't manage the strange signature, so I have change this one with a signature recognized from the Qts.
    So, qdbusviewer work, but the result is empty. So I've write some qDebug in the << and >> operators and in the callback function, but that don't write anything.

    I've try the code called in the adaptor in another place, and all work.

    I've Qt 4.3.2. If you want to see some code it isn't a problem (the project is under GPL2 but the code of the last 2 days isn't online becouse don't working).

    Thanks

    EDIT:

    Sorry, double thread!
    Last edited by Yota_VGA; 21st November 2007 at 01:46. Reason: Double threading

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.