Doc: Clarify ownership semantics of objects returned by property getters
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>
Tue, 14 Aug 2012 09:08:33 +0000 (11:08 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 28 Aug 2012 04:21:58 +0000 (06:21 +0200)
Change-Id: I8d19756e95ff02ed67b39ba4741aff4fda5896ce
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
src/qml/qml/qqmlengine.cpp

index be20708..1a9fc58 100644 (file)
@@ -1082,8 +1082,10 @@ void QQmlEngine::setContextForObject(QObject *object, QQmlContext *context)
   have been transferred to the C++ caller.
 
   Objects not-created by QML have CppOwnership by default.  The
-  exception to this is objects returned from a C++ method call.  The
-  ownership of these objects is passed to JavaScript.
+  exception to this is 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.
 
   Calling setObjectOwnership() overrides the default ownership
   heuristic used by QML.