diff options
author | Topi Reinio <topi.reinio@qt.io> | 2024-01-04 12:00:51 +0000 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2024-01-06 05:50:39 +0000 |
commit | dfe316ad0bacca691d14c7ddcb0d109b66c45923 (patch) | |
tree | aa33b2171cb6872e56ac89c22a40c230c7a09c28 /src/qml/doc | |
parent | f719ee6408a92439a65e82abea4403df6a844066 (diff) |
Doc: Fix linking issues and missing QDoc commands
Fix multiple incorrect \l (link) command arguments that were not
captured by documentation testing in CI.
Add missing \endqml and \endcode commands to code snippets.
Convert \sa commands that are meant to be related to specific \section
commands into manual 'See also' paragraphs. Otherwise, they are listed
at the bottom of the page.
Pick-to: 6.7
Change-Id: Icf2a97f63b8b8cdec2d9398448d28759dabdb06b
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/cppintegration/contextproperties.qdoc | 2 | ||||
-rw-r--r-- | src/qml/doc/src/qmllanguageref/typesystem/sequencetypes.qdoc | 4 | ||||
-rw-r--r-- | src/qml/doc/src/qmllanguageref/typesystem/valuetypes.qdoc | 4 | ||||
-rw-r--r-- | src/qml/doc/src/qmllint/duplicate-property-binding.qdoc | 3 | ||||
-rw-r--r-- | src/qml/doc/src/qmllint/missing-type.qdoc | 12 | ||||
-rw-r--r-- | src/qml/doc/src/qmlsingletons.qdoc | 5 | ||||
-rw-r--r-- | src/qml/doc/src/qmltypereference.qdoc | 6 | ||||
-rw-r--r-- | src/qml/doc/src/qtqml-writing-a-module.qdoc | 6 | ||||
-rw-r--r-- | src/qml/doc/src/qtqml.qdoc | 7 |
9 files changed, 25 insertions, 24 deletions
diff --git a/src/qml/doc/src/cppintegration/contextproperties.qdoc b/src/qml/doc/src/cppintegration/contextproperties.qdoc index 07022fd506..1133f0dce0 100644 --- a/src/qml/doc/src/cppintegration/contextproperties.qdoc +++ b/src/qml/doc/src/cppintegration/contextproperties.qdoc @@ -19,7 +19,7 @@ \note Context properties can generally be replaced either by regular properties on the root object of a component, or by singletons defined either in C++ using \l{QML_SINGLETON}{QML_SINGLETON} - or in QML using \l{qtqml-documents-definetypes.html#singleton}{pragma Singleton}. + or in QML using \l{Structure of a QML Document#Singleton}{pragma Singleton}. When loading a QML object into a C++ application, it can be useful to directly embed some C++ data that can be used from within the QML code. This makes it possible, for example, to invoke a C++ diff --git a/src/qml/doc/src/qmllanguageref/typesystem/sequencetypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/sequencetypes.qdoc index e1c2c2810c..ca10f8c23b 100644 --- a/src/qml/doc/src/qmllanguageref/typesystem/sequencetypes.qdoc +++ b/src/qml/doc/src/qmllanguageref/typesystem/sequencetypes.qdoc @@ -62,7 +62,7 @@ like the pre-defined sequence types and are stored as-is. However, they have no QML names. \warning Sequences stored as a C++ container like \l QList or \c std::vector are -subject to the effects caused by \l{Value Type and Sequence References} and +subject to the effects caused by \l{QML Value Type and Sequence References} and should thus be handled with care. \l QQmlListProperty is not affected since it is only a view for an underlying container. C++ standard containers such as \c std::vector are not implicitly shared. Therefore, copying them always @@ -70,7 +70,7 @@ produces a deep copy. Since a sequence read from a property always has to be copied at least once, using such containers as QML sequences is rather expensive, even if you don't modify them from QML. -The QtQml module contains a few \l{qtqml-qmlmodule.html#sequence-types}{sequence types} +The QtQml module contains a few \l [QML] {QtQml#Sequence Types}{sequence types} you may want to use. */ diff --git a/src/qml/doc/src/qmllanguageref/typesystem/valuetypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/valuetypes.qdoc index 43ff559e8a..0bf849b155 100644 --- a/src/qml/doc/src/qmllanguageref/typesystem/valuetypes.qdoc +++ b/src/qml/doc/src/qmllanguageref/typesystem/valuetypes.qdoc @@ -17,8 +17,8 @@ two different properties, the properties carry separate values. If you modify one of them, the other one stays the same. Value types are only conceptually passed by value since it must still be possible to interact with them as if they were JavaScript objects. To facilitate this, in reality they are passed as -\l{Value Type and Sequence References}{Value Type References} when you access them -from JavaScript code. +\l{QML Value Type and Sequence References}{Value Type References} when you access +them from JavaScript code. Unlike an object type, a value type cannot be used to declare QML objects: it is not possible, for example, to declare an \c int{} object or a \c size{} object. diff --git a/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc b/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc index 90602f0410..4826a552ea 100644 --- a/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc +++ b/src/qml/doc/src/qmllint/duplicate-property-binding.qdoc @@ -47,8 +47,9 @@ Rectangle { NumberAnimation { duration: 2000 } } } +\endqml -\sa {Property Modifier Types} +\b {See also} \l {Property Modifier Types}. \section1 Duplicate Value Source On Property diff --git a/src/qml/doc/src/qmllint/missing-type.qdoc b/src/qml/doc/src/qmllint/missing-type.qdoc index d5d57b149c..7c19ec1820 100644 --- a/src/qml/doc/src/qmllint/missing-type.qdoc +++ b/src/qml/doc/src/qmllint/missing-type.qdoc @@ -26,7 +26,7 @@ actually installed, and that their modules end up in an The warning might also indicate that the type of the property referenced by the alias does not have a QML counterpart. The referenced property type might be missing the -\l{QQmlEngine Class#QML_ELEMENT}{QML_ELEMENT} macro, for example. Refer to +\l{QQmlEngine::}{QML_ELEMENT} macro, for example. Refer to \l{Defining QML Types from C++} or \l{Overview - QML and C++ Integration} in this case. \section2 Why is this bad? @@ -116,10 +116,11 @@ qt_add_qml_module(mymodule DEPENDENCIES QtQuick ... ) +\endcode Now, the warning should be gone! -\sa{Declaring module dependencies} +\b {See also} \l {Declaring module dependencies}. \section1 No Type Found For Property @@ -133,7 +134,7 @@ actually installed, and that their modules end up in an The warning might also indicate that the type of the property does not have a QML counterpart. The property type might be missing the -\l{QQmlEngine Class#QML_ELEMENT}{QML_ELEMENT} macro, for example. Refer to +\l{QQmlEngine::}{QML_ELEMENT} macro, for example. Refer to \l{Defining QML Types from C++} or \l{Overview - QML and C++ Integration} in this case. \section2 Why is this bad? @@ -229,11 +230,10 @@ qt_add_qml_module(mymodule DEPENDENCIES QtQuick ... ) +\endcode Now, the warning should be gone! -\sa{Declaring module dependencies} - -\endcode +\b {See also} \l {Declaring module dependencies}. */ diff --git a/src/qml/doc/src/qmlsingletons.qdoc b/src/qml/doc/src/qmlsingletons.qdoc index a07d0b9d46..f89c7dea7a 100644 --- a/src/qml/doc/src/qmlsingletons.qdoc +++ b/src/qml/doc/src/qmlsingletons.qdoc @@ -10,8 +10,7 @@ In QML, a singleton is an object which is created at most once per \l{QQmlEngine}{engine}. In this guide, we'll \l{How can singletons be created in QML}{explain how to create} singletons and \l{Accessing singletons}{how to use them}. We'll also provide some -\l{Guidelines for using singletons}{best practices} -for working with singletons. +best practices for working with singletons. \section1 How can singletons be created in QML? @@ -259,7 +258,7 @@ Most of the time, it makes more sense to group data you want to expose together of a single singleton. Assume for instance that you want to create an ebook reader where you need to expose three \l{QAbstractItemModel}{abstract item models}, one for local books, and two for remote sources. Instead of repeating the process -for \l{Exposing an already existing object as a singleton}{exposing existing objects} +for \l{Exposing an existing object as a singleton}{exposing existing objects} three times, you can instead create one singleton and set it up before starting the main application: \code diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc index 7ec7624b9e..e6896addf6 100644 --- a/src/qml/doc/src/qmltypereference.qdoc +++ b/src/qml/doc/src/qmltypereference.qdoc @@ -58,9 +58,9 @@ provided: \section1 Sequence Types -The following \l{qtqml-typesystem-topic.html#sequence-types}{QML sequence types} -are provided by the Qt QML module in addition to the ones registered with each -value type and object type: +The following \l{QML Sequence Types}{QML sequence types} are provided by the Qt +QML module in addition to the ones registered with each value type and object +type: \list \li \c {std::vector<QString>} diff --git a/src/qml/doc/src/qtqml-writing-a-module.qdoc b/src/qml/doc/src/qtqml-writing-a-module.qdoc index 0f75d492e8..febd252359 100644 --- a/src/qml/doc/src/qtqml-writing-a-module.qdoc +++ b/src/qml/doc/src/qtqml-writing-a-module.qdoc @@ -127,7 +127,7 @@ In some cases, Qt's own QML modules may show different behavior, depending on wh version is imported. In particular, if a property is added to a QML component, and your code contains unqualified access to another property of the same name, your code will break. In the following example, the code will behave differently -depending on the version of Qt, because the \l{QQuickRectangle::topLeftRadius} +depending on the version of Qt, because the \l [QML] {Rectangle::}{topLeftRadius} property was added in Qt 6.7: \qml @@ -183,7 +183,7 @@ Item { Another problem solved by versioning is the fact that QML components imported by different modules may shadow each other. In the following example, if \c{MyModule} were to introduce a component named \c{Rectangle} in a newer version, the \c{Rectangle} -created by this document would not be a \l{QQuickRectangle} anymore, but rather the +created by this document would not be a \c {QQuickRectangle} anymore, but rather the new \c{Rectangle} introduced by \c{MyModule}. \qml @@ -247,7 +247,7 @@ in QML. The only way to version QML documents is to add a new document with sepa If a component from your module \c{A} imports another module \c{B} and instantiates a type from that module as the root element, then the import version of \c{B} is relevant for the -properties available from the resulting component, no matter what version of \l{A} is +properties available from the resulting component, no matter what version of \c{A} is imported by a user. Consider a file \c{TypeFromA.qml} with version \c{2.6} in module \c{A}: diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc index c7a1390d8f..2bffeecdb6 100644 --- a/src/qml/doc/src/qtqml.qdoc +++ b/src/qml/doc/src/qtqml.qdoc @@ -4,13 +4,14 @@ /*! \page qtqml-index.html \title Qt Qml -\brief The Qt Qml module implements the QML language and offers APIs to register types for it +\brief The Qt Qml module implements the QML language and offers APIs to register + types for it. The Qt Qml module provides a framework for developing applications and libraries with the \l{The QML Reference}{QML language}. It defines and implements the language and engine infrastructure, and provides an API to enable application -developers to \l{Registering Types and Modules}{register} custom QML types and -modules and integrate QML code with JavaScript and C++. The Qt Qml module +developers to \l{Registering QML Types and QML Modules}{register} custom QML types +and modules and integrate QML code with JavaScript and C++. The Qt Qml module provides both a \l{Qt QML QML Types}{QML API} and a \l{Qt Qml C++ Classes}{C++ API}. |