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

Correctly handle QVariant properties on the replica side

    XMLWordPrintable

Details

    • Linux/X11
    • 5517b432b1f3e602240bdf5b678a825f1ecafb35 (qt/qtremoteobjects/5.12)

    Description

      When a QVariant property is used in a repc file and the source emits a change to this property the node doesn't handle the QVariant correctly and forwards an incorrect void*[] to qt_meta_call which produces the following warning in the best case:

      Trying to construct an instance of an invalid type, type id: 977635296

      or a crash in the worst case.

      The problem is in void QRemoteObjectNodePrivate::onClientRead(QObject *obj)

      param[i + 1] = const_cast<void *>(rxArgs[i].data());
      

      As the QVariant is supposed to be a QVariant, it doesn't need to be converted to its original type, instead param[i +1] should be &rxArgs[i] in this case.

      Attachments

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

        Activity

          People

            bstottle Brett Stottlemyer
            gagi Dominik Holland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes