Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
6.5.4
-
None
-
-
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).