From 2d4787de33ce81cf53cda6f63719f1167bd94392 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 19 Jun 2019 11:47:56 +0200 Subject: Doc: Fix \code and \qml usage in 'QML Object Attributes' Missing \endcode commands caused malformed output and linking issues. Change-Id: Idaf3cf998c2c0f4352a738b21b66abe5e89c197d Reviewed-by: Paul Wicking --- src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/qml/doc') diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index 15e8e4c52c..c4ecaf367c 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -548,7 +548,7 @@ Therefore, if you create an alias to an object referenced via id with extra properties declared inline, the extra properties won't be accessible through the alias: -\code +\qml // MyItem.qml Item { property alias inner: innerItem @@ -558,23 +558,23 @@ Item { property int extraProperty } } -\code +\endqml You cannot initialize \a inner.extraProperty from outside of this component, as inner is only an \a Item: -\code +\qml // main.qml MyItem { inner.extraProperty: 5 // fails } -\code +\endqml However, if you extract the inner object into a separate component with a dedicated .qml file, you can instantiate that component instead and have all its properties available through the alias: -\code +\qml // MainItem.qml Item { // Now you can access inner.extraProperty, as inner is now an ExtraItem @@ -589,8 +589,7 @@ Item { Item { property int extraProperty } -\code - +\endqml \section3 Default Properties -- cgit v1.2.3