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

QT remote objects false conversion warning in case of QVariant propery.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.4, 5.13.1, 5.14.0 Alpha
    • 5.12.1
    • Remote Objects
    • None
    • ubuntu 18.04
      QT 5.12.1 (installed from webpage)
    • Linux/X11
    • 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.

      Attachments

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

        Activity

          People

            bstottle Brett Stottlemyer
            zmartonka Zoltán Mártonka
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes