Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.5.4
-
None
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.