Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.12.1
-
None
-
ubuntu 18.04
QT 5.12.1 (installed from webpage)
-
-
5517b432b1f3e602240bdf5b678a825f1ecafb35 (qt/qtremoteobjects/5.12)
Description
If I create a remote object with a QVariant property, e.g:
my_obj. rep:
class Apple { PROP(bool test1 = false); PROP(QVariant var_prop); };
It works perfectly (even with custom Q_GADGET type.), but every time the property is read, the following warning is displayed client side:
QtRO cannot convert the property var_prop to type QVariant
This is because the generated getter in the replica checks variant.canConvert<QVariant>() which is false. (QVariant::canConvert is 'false' for QVariant )
I think this check should not be generated when the remote objects propery type is QVariant, because it does not need a conversion and (at least for me) it works without problem.