diff options
author | Jerome Pasion <jerome.pasion@qt.io> | 2020-11-20 14:30:21 +0100 |
---|---|---|
committer | Jerome Pasion <jerome.pasion@qt.io> | 2020-11-26 17:53:19 +0100 |
commit | 72746ef0ad69d589de91f43aa2043d6e47745d68 (patch) | |
tree | 4b4d187517ff09e819bdd6a1e74c70b9bd4b89a1 /src/qml/doc | |
parent | f3ff873f67474d30cc04fb7b7a35e78d1c8922e3 (diff) |
Doc: Remove version numbers for import statement
-recommend using the import statement without versions for Qt 6.0
-update use of \qml snippet without \QtMinorVersion
-some language change to be neutral about versions
Task-number: QTBUG-87155
Pick-to: 6.0 6.0.0
Change-Id: I3ac44f93aab3086c1a49de79ecc677beb4ef9180
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/qmllanguageref/syntax/signals.qdoc | 32 | ||||
-rw-r--r-- | src/qml/doc/src/qmltypereference.qdoc | 7 | ||||
-rw-r--r-- | src/qml/doc/src/qtqml.qdoc | 4 |
3 files changed, 21 insertions, 22 deletions
diff --git a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc index 075b3a7646..b151478566 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc @@ -59,9 +59,9 @@ receiving this signal should be \c onClicked. In the example below, whenever the button is clicked, the \c onClicked handler is invoked, applying a random color to the parent \l Rectangle: -\qml \QtMinorVersion -import QtQuick 2.\1 -import QtQuick.Controls 2.\1 +\qml +import QtQuick +import QtQuick.Controls Rectangle { id: rect @@ -87,8 +87,8 @@ these signals are written in the form \e on<Property>Changed, where For example, the \l MouseArea type has a \l {MouseArea::pressed}{pressed} property. To receive a notification whenever this property changes, write a signal handler named \c onPressedChanged: -\qml \QtMinorVersion -import QtQuick 2.\1 +\qml +import QtQuick Rectangle { id: rect @@ -116,9 +116,9 @@ received by the root \l Rectangle instead, by placing the \c onClicked handler in a \l Connections object that has its \l {Connections::target}{target} set to the \c button: -\qml \QtMinorVersion -import QtQuick 2.\1 -import QtQuick.Controls 2.\1 +\qml +import QtQuick +import QtQuick.Controls Rectangle { id: rect @@ -151,8 +151,8 @@ For example, \l{Component::completed}{Component.onCompleted} is an attached signal handler. It is often used to execute some JavaScript code when its creation process is complete. Here is an example: -\qml \QtMinorVersion -import QtQuick 2.\1 +\qml +import QtQuick Rectangle { width: 200; height: 200 @@ -195,9 +195,9 @@ root \l Rectangle object has an \c activated signal, which is emitted whenever t child \l TapHandler is \c tapped. In this particular example the activated signal is emitted with the x and y coordinates of the mouse click: -\qml \QtMinorVersion +\qml // SquareButton.qml -import QtQuick 2.\1 +import QtQuick Rectangle { id: root @@ -237,8 +237,8 @@ signal to be received by a method instead of a signal handler. Below, the \c messageReceived signal is connected to three methods using the \c connect() method: -\qml \QtMinorVersion -import QtQuick 2.\1 +\qml +import QtQuick Rectangle { id: relay @@ -289,8 +289,8 @@ Rectangle { By connecting signals to other signals, the \c connect() method can form different signal chains. -\qml \QtMinorVersion -import QtQuick 2.\1 +\qml +import QtQuick Rectangle { id: forwarder diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc index b28d6ac16c..83544b1a66 100644 --- a/src/qml/doc/src/qmltypereference.qdoc +++ b/src/qml/doc/src/qmltypereference.qdoc @@ -43,10 +43,9 @@ The types provided by the \c QtQml module are only available in a QML document if that document imports the \c QtQml namespace (or if the document imports the \c QtQuick namespace, as noted below). -The current version of the \c QtQml module is version 2.\QtMinorVersion, and -thus it may be imported via the following statement: +To use the module, import the \c QtQml module with the following statement: -\qml \QtMinorVersion +\qml import QtQml \endqml @@ -54,7 +53,7 @@ Most clients will never need to use the \c QtQml import, as all of the types are also provided by the \c QtQuick namespace which may be imported as follows: -\qml \QtMinorVersion +\qml import QtQuick \endqml diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc index 9c2ce11aa0..23f4a81249 100644 --- a/src/qml/doc/src/qtqml.qdoc +++ b/src/qml/doc/src/qtqml.qdoc @@ -53,8 +53,8 @@ for an introduction to writing QML applications. The QML types in Qt QML are available through the \c QtQml import. To use the types, add the following import statement to your .qml file: -\qml \QtMinorVersion -import QtQml 2.\1 +\qml +import QtQml \endqml \section2 C++ API |