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

Copying JavaScript object to QVariant breaks functions

    XMLWordPrintable

Details

    • 3dbe05f6bf3fd51ce8097c35f6c7f12b39acb0f6 (qtdeclarative)

    Description

      If a JavaScript object is passed to C++ through a QVariant and subsequently set back to the JS engine, all functions have been converted to empty objects. The copy should be shallow and transfer an object reference only.

      In the attached example, the "console" property of the JavaScript global object is passed back to the engine through a QVariant, which causes all functions to stop working.

      Attachments

        1. qmltest3.tgz
          0.6 kB
          Topi Mäenpää

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              topiolli Topi Mäenpää
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes