From 284faaa6eada5ef50db083b0936ca00e7f61ef2a Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 19 Feb 2024 16:54:17 +0100 Subject: Doc: Remove confusing and wrong section about aliases I cannot figure out what this was supposed to mean. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-119448 Change-Id: Iac8ede669d5b09c674abf115f13f977f854b7d96 Reviewed-by: Fabian Kosmale --- src/qml/doc/snippets/qml/properties.qml | 15 ++------------- .../doc/src/qmllanguageref/syntax/objectattributes.qdoc | 10 ---------- 2 files changed, 2 insertions(+), 23 deletions(-) (limited to 'src/qml/doc') diff --git a/src/qml/doc/snippets/qml/properties.qml b/src/qml/doc/snippets/qml/properties.qml index 67a7267acf..39f508e424 100644 --- a/src/qml/doc/snippets/qml/properties.qml +++ b/src/qml/doc/snippets/qml/properties.qml @@ -229,20 +229,9 @@ Button { //! [image alias] Item { -id: widget - -//! [alias complete] -property alias widgetLabel: label - -//will generate an error -//widgetLabel.text: "Initial text" - -//will generate an error -//property alias widgetLabelText: widgetLabel.text - -Component.onCompleted: widgetLabel.text = "Alias completed Initialization" -//! [alias complete] + id: widget + property alias widgetLabel: label Text {id: label} } diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index 2cd246a3e3..0fb7d5f039 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -498,16 +498,6 @@ the other way around. \section4 Considerations for Property Aliases -Aliases are only activated once a component has been fully initialized. An -error is generated when an uninitialized alias is referenced. Likewise, -aliasing an aliasing property will also result in an error. - -\snippet qml/properties.qml alias complete - -When importing a \l{QML Object Types}{QML object type} with a property alias in -the root object, however, the property appear as a regular Qt property and -consequently can be used in alias references. - It is possible for an aliasing property to have the same name as an existing property, effectively overwriting the existing property. For example, the following QML type has a \c color alias property, named the same as the -- cgit v1.2.3