summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-06-06 10:10:53 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-06-06 16:41:51 +0000
commitbf1f17364f6c1f548715acf69023f511492682f3 (patch)
tree99d8505b2c530913bb22fbb43cca498500588400 /src/corelib/kernel
parentae42461f44cf63a66a087cf8c2660c3d914f474c (diff)
Add note about calling invokable functions from QML when returning QObjects
Link to the data ownership section of the QML documentation to elaborate on the special rules that apply for invokable functions that return QObjects. Change-Id: I41ea9089468c9505807cf1fde22be759b397a6d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qobject.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 6181bd579e..3717d7a19e 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4533,6 +4533,11 @@ QDebug operator<<(QDebug dbg, const QObject *o)
invoked using QMetaObject::invokeMethod().
Since \c normalMethod() function is not registered in this way, it cannot
be invoked using QMetaObject::invokeMethod().
+
+ If an invokable member function returns a pointer to a QObject or a
+ subclass of QObject and it is invoked from QML, special ownership rules
+ apply. See \l{qtqml-cppintegration-data.html}{Data Type Conversion Between QML and C++}
+ for more information.
*/
/*!