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

QJSValue doesn't take QProperties from the prototype

    XMLWordPrintable

Details

    Description

      as also tested in an autotest, if i change the prototype for a qjsvalue, then all its properties become accessible to the parent qjsvalue, like:

      QJSValue protoValue = eng->newQObject(newProto);
      protoValue.setProperty("b", "Value 2");
      globalObject.setPrototype(protoValue);

      then globalObject.property("b") gets the expected value.

       

      However, this doesn't work for the properties that are wrapped from a qobject, so, if newProto had defined some Q_PROPERTY of its own, those will not be accessible from globalObject, however globalObject.hasProperty() for those properties will return true, as they were accessible, which would be what's expected

       

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            notmart Marco Martin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes