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

Clarify documentation for QML object ownership

    XMLWordPrintable

Details

    • 3fee095bac4c2c777119c13e201777d3202ae084 (qtdeclarative)

    Description

      The documentation for the QQmlEngine::ObjectOwnership enum (http://qt-project.org/doc/qt-5.1/qtqml/qqmlengine.html#ObjectOwnership-enum) states in two different areas:

      • "When the object is returned to QML as the return value of a method call or property access, QML will track it, and delete the object if there are no remaining JavaScript references to it..."
      • "...objects returned from C++ method calls; in these cases, the ownership of the returned objects will be set to JavaScriptOwnerShip. Note this applies only to explicit invocations of Q_INVOKABLE methods or slots, and not to property getter invocations."

      The information for objects accessed via property isn't clear (are they given Cpp or JavaScript ownership?).

      Attachments

        1. ownership.tar.gz
          12 kB
          Michael Brasser

        Issue Links

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

          Activity

            People

              kavindra Kavindra Palaraja (Inactive)
              mbrasser Michael Brasser
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes