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

[PATCH] Improved error output for qdbusxml2cpp

    XMLWordPrintable

Details

    • 5
    • b48a588e1 (dev), d625b9bc4 (dev), 248d2103b (dev), 058d99361 (dev), bcc93850f (dev), 2f82ba66e (dev), 2e8a48c1c (dev), 1572c420f (dev), ee593cdde (dev)
    • Foundation Sprint 83, Foundation Sprint 84, Foundation Sprint 85, Foundation Sprint 86

    Description

      I did: qdbusxml2cpp org.kde.KdedGlobalAccel.xml -p test
      and it said:

      Got unknown type `ai'
      You should add <annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="<type>"/> to the XML description

      That wasn't helpful though, because it didn't say in which method the problem was.
      (many methods and signals use "ai" in that file)

      And in fact, the second line was wrong too, since it was the Out parameter of a signal which
      was missing the annotation. writeArgList() is called with the signal params into "inputArgs",
      so "In" is wrong. I could have added yet another parameter, but I think it's cleaner to have
      a writeSignalArgList with a single Arguments parameter.

      => The attached patch improves the error output to:

      Got unknown type `ai' in `yourShortcutGotChanged'
      You should add <annotation name="com.trolltech.QtDBus.QtTypeName.Out1" value="<type>"/> to the XML description

      Testcase:
      <!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="org.kde.KdedGlobalAccel">
      <signal name="yourShortcutGotChanged">
      <arg name="action" type="as" direction="out"/>
      <arg name="newShortcut" type="ai" direction="out"/>
      <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QList<int>"/>
      </signal>
      </interface>
      </node>

      The bug is Out0 instead of Out1, that's a qdbuscpp2xml bug which I'll report+fix in a separate email.

      Attachments

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

        Activity

          People

            ievgenii.meshcheriakov Ievgenii Meshcheriakov
            jabarron Jason Barron
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: