aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-01-10 07:53:01 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-01-11 10:13:39 +0100
commite9e315da06bc067b0dcb160cd88492bfe89b08c0 (patch)
tree937f67048bf995b60d68d964d2873134197d4ea4 /src/qml/qml/qqmlengine.cpp
parented8618a82d68fa1485e37e24593365bd6e4c920c (diff)
QML: Document that internal contexts are read-only
Pick-to: 6.5 Fixes: QTBUG-69075 Change-Id: Ia671a74ede08f71e73344e2a4fe135cda6a95a64 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index ae56c7ea2a..80533e75ae 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1057,13 +1057,14 @@ void QQmlEngine::retranslate()
}
/*!
- Returns the QQmlContext for the \a object, or 0 if no
+ Returns the QQmlContext for the \a object, or nullptr if no
context has been set.
- When the QQmlEngine instantiates a QObject, the context is
- set automatically.
+ When the QQmlEngine instantiates a QObject, an internal context is assigned
+ to it automatically. Such internal contexts are read-only. You cannot set
+ context properties on them.
- \sa qmlContext(), qmlEngine()
+ \sa qmlContext(), qmlEngine(), QQmlContext::setContextProperty()
*/
QQmlContext *QQmlEngine::contextForObject(const QObject *object)
{