aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-08-29 15:36:10 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-31 22:48:32 +0000
commitff8893d28d5d2e8470d04bf49af895f27bdc0343 (patch)
tree91624fcb8e424e2bf714e4fd089da59ffa687409
parentd26d6baeccc608aecf27115cd7c3ec8fe761653f (diff)
Doc: Do not refer to files in ComponentBehavior documentation
There may be multiple QML contexts created from one file. If you define a component in one of them, you cannot instantiate it in a different one. Change-Id: I8a130f60bc03979bae7b22495737c3d971c09618 Reviewed-by: Kari Hautamäki <kari.hautamaki@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7d013de05860cdfd2df15b340685e9cc4a86a001) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc b/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc
index 9b1a0f5687..58e2027e1c 100644
--- a/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc
@@ -255,14 +255,14 @@ The same declaration can also be given for C++-defined types. See
\section2 ComponentBehavior
With this pragma you can restrict components defined in this file to only
-create objects within the context of the same file. This holds for inline
+create objects within their original context. This holds for inline
components as well as Component elements explicitly or implicitly created
-as properties. If a component is bound to a file context, you can safely
+as properties. If a component is bound to its context, you can safely
use IDs from the rest of the file within the component. Otherwise, the
engine and the QML tooling cannot know in advance what type, if any, such
IDs will resolve to at run time.
-In order to bind the components to the file scope specify the \c{Bound}
+In order to bind the components to their context specify the \c{Bound}
argument:
\qml
@@ -272,7 +272,7 @@ pragma ComponentBehavior: Bound
The default is \c{Unbound}. You can also specify it explicitly. In a
future version of Qt the default will change to \c{Bound}.
-Delegate components bound to the file context don't receive their own
+Delegate components bound to their context don't receive their own
private contexts on instantiation. This means that model data can only
be passed via \l{Required Properties}{required properties} in this case.
Passing model data via context properties will not work. This concerns