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

qdbusxml2cpp says Invalid D-Bus type signature for custom type with annotation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.8.2
    • D-Bus
    • None
    • Linux, X11, self-built Qt

    Description

      $ qdbusxml2cpp -m -i person.h -p peopleserver_interface com.kdab.PeopleServerAPI.xml
      com.kdab.PeopleServerAPI.xml:5:8: error: Invalid D-Bus type signature 'a{ssss}' found while parsing introspection
      

      And yet there's an annotation that says what to do about that custom type:

            <arg type="a{ssss}" direction="out"/>
            <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVector&lt;Person&gt;"/>
      

      And if I comment out the call to QDBusUtil::isValidSingleSignature in QDBusXmlParser::parseArg (which leads to that error), everything works fine, the generated code is correct and builds, the app works at runtime, it's all good.

      So this is basically a false positive, qdbusxml2cpp being too strict for no good reason.
      Qt5's qdbusxml2cpp worked and didn't even output an error/warning because qDBusParserError failed to say anything (it was a qCDebug using an area where debug msgs were off by default), and because it would continue and exit with code 0 after that.
      Qt6's qdbusxml2cpp has this new code:
      if (reporter.hadErrors())
      exit(1);

      So overall, a silent qDebug in Qt5 got upgraded to a qFatal in Qt-6.7, due to "qdbusxml2cpp: Improve error reporting" https://codereview.qt-project.org/c/qt/qtbase/+/487481

      Attachments

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

        Activity

          People

            ievgenii.meshcheriakov Ievgenii Meshcheriakov
            dfaure_kdab David Faure
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes