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

qdbuscpp2xml only exports methods/signals with QDBusVariant arguments if there's at least one method/signal with QVariant as argument

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.5.3, 6.6.0 Beta3, 6.7.0 FF
    • 6.5.4
    • D-Bus
    • None
    • Linux/Wayland, Linux/X11
    • 56bd5d60c (dev), a551eeedb (6.5), 7079c2866 (6.6)

    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 intSignal(int); 
         void variantSignal(const QVariant&); 
         void dbusVariantSignal(const QDBusVariant&); 
      };
      

      The error Type not registered with QtDBus in parameter list: QVariant is printed and the following XML definition is generated, with the remaining two signals that don't use QVariant (as expected):

      <!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="intSignal"> 
           <arg type="i" direction="out"/> 
         </signal> 
         <signal name="dbusVariantSignal"> 
           <arg type="v" direction="out"/> 
         </signal> 
       </interface> 
      </node>
      

      However, if I remove the signal that has a QVariant, like this:

      class QDBusVariantBugRepro : public QDBusAbstractAdaptor 
      { 
         Q_OBJECT 
         Q_CLASSINFO("D-Bus Interface", "org.kde.dbusvariant") 
      
      Q_SIGNALS: 
         void intSignal(int); 
         //void variantSignal(const QVariant&);
         void dbusVariantSignal(const QDBusVariant&); 
      };
      

      Then I get Unregistered input type in parameter list: QDBusVariant and the signal that uses QDBusVariant is also missing!

      <!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="intSignal"> 
           <arg type="i" direction="out"/> 
         </signal> 
       </interface> 
      </node>
      

      For some reason, using QVariant has an effect over whether QDBusVariant can be exported or not.

      This is a regression in Qt6, since in Qt5 the second header does generate the same XML as the first one (ie: including the signal that uses QDBusVariant).

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            albertvaka Albert Vaca Cintora
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes