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

qdbuscpp2xml can export methods/signals with QVariantList arguments but not QVariant

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.5.4
    • D-Bus
    • None
    • Linux/Wayland, Linux/X11

    Description

      When calling qdbuscpp2xml on the following header:

      class QDBusVariantBugRepro : public QDBusAbstractAdaptor 
      { 
         Q_OBJECT 
         Q_CLASSINFO("D-Bus Interface", "org.kde.dbusvariant") 
      
      Q_SIGNALS:
         void variantSignal(const QVariant&); 
         void variantListSignal(const QVariantList&); 
         void variantMapSignal(const QVariantMap&); 
      };
      

      The error Type not registered with QtDBus in parameter list: QVariant is printed and the following XML definition is generated, only with the QVariantList and QVariantMap signals:

      <!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.dbusvariant">
          <signal name="variantListSignal">
            <arg type="av" direction="out"/>
          </signal>
          <signal name="variantMapSignal">
            <arg type="a{sv}" direction="out"/>
            <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
          </signal>
        </interface>
      </node>
      

      Given that Qt can convert to and from dbus a QVariantList and a QVariantMap, which contain QVariant objects, it seems that it should be trivial to also convert the simpler standalone QVariant type.

      Looking at qdbusmetatype.cpp it seems that the QVariant type is not registered in the database like all the other types.
       

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            albertvaka Albert Vaca Cintora
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes