Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45434

DBUS_ADAPTORS variable can't handle xml with multiple outputs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.4.1
    • Build tools: qmake, D-Bus
    • None
    • CentOS 7

    Description

      <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
      <node>
        <interface name="sample.client">
          <method name="dualOutputMethod">
            <arg type="b" direction="out"/>
            <arg type="i" direction="out"/>
          </method>
        </interface>
      </node>
      

      Here's a sample dbus xml with multiple output. This is handled just fine using DBUS_INTERFACES in the qt .pro file, but it isn't quite handled using DBUS_ADAPTORS (both undocumented...). I get output like this:

      bool ClientAdaptor::dualOutputMethod(int &out1)
      {
          // handle method call sample.client.dualOutputMethod
          //return static_cast<YourObjectType *>(parent())->dualOutputMethod(out1);
      }
      

      The solution I found online was to use the "-l" argument with qdbusxml2cpp, which would then mean I couldn't use DBUS_ADAPTORS anymore, and I'd have to implement some hack of using system calls in the header, or some other method of generating the cpp files. DBUS_ADAPTORS should be able to handle methods with multiple outputs, or someway to pass in the "-l" argument for that variable.

      One other thing to note is that I originally had a custom abstract dbus adaptor which worked just fine with multiple outputs as a workaround to using this variable... In case more people stumble upon this issue and are looking for workarounds that work for them (http://doc.qt.io/qt-5/usingadaptors.html).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            atemple03 Adam Temple
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes