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

qdbusxml2cpp gives no error output on malformed input, but generates broken output

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.7.0
    • 4.8.5, 5.5.0
    • D-Bus
    • None
    • Linux
    • 13
    • b48a588e1 (dev), d625b9bc4 (dev), 248d2103b (dev), 058d99361 (dev), bcc93850f (dev), 2f82ba66e (dev), 2e8a48c1c (dev), 1572c420f (dev), ee593cdde (dev)
    • Foundation Sprint 88

    Description

      When the XML file has errors it can happen that qdbusxml2cpp finishes without any error notice and with a return code of 0, but with invalid header/C++ files generated.

      The attached XML file contains 2 errors, both cause wrong output code to be generated:
      -the interface name may not contain dashes
      -a slash is missing on the first input parameter

      Any combination of these errors will lead to defective code to be generated, but there is neither an error nor a return code different from 0, so there is no way to find this until one compiles the classes that use this and wonders about strange errors from them or maybe even that works but the DBus interface at runtime simply does not include the expected methods.

      The call was:

      /usr/bin/qdbusxml2cpp -v -a xml2cpptest -l xml2cpptest org.qt-project.testqtdbusxml2cpp.xml; echo $?

      Attachments

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

        Activity

          People

            ievgenii.meshcheriakov Ievgenii Meshcheriakov
            rebemlix Rolf Eike Beer
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes