The meta-call convention for reading properties differs between Qml and QDBus.
QML expects only to provide a pointer to the return value in args[0]. That is
also how the metacall was originally introduced in Qt 4. QDBus also expects
that the caller allocates a QVariant and provides a pointer to it in a[2], in
addition to a[1] being a pointer to an int that is used to report where the
return value can be found (in where a[0] points to or the variant in a[1]) -
this is useful to report errors when reading the property by clearing the
variant.
For performance reasons, QML avoids the creation of a QVariant when reading
properties. As however QDBus expects it, a crash occurs.
This patch changes the QDBus metacall implementation to not rely on the caller
to provide a QVariant.
Task-number: QTBUG-15052
Change-Id: I2f2c5b3ef2c1d93cc72eee1fa32a95d299a104c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>