aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2018-09-09 14:56:48 +0200
committerTopi Reiniƶ <topi.reinio@qt.io>2018-09-14 10:23:29 +0000
commit940c06a4645cca190055a3987db8147b4e2de02c (patch)
tree0fb5e97b5cf24b42cf4d7b5740975b4dc5015a12 /src/qml/doc/src
parentd7365a653fffe0a8b05f2f56715de01681e5203a (diff)
Doc: Use a macro to resolve the QML import version
QDoc now supports macros for its command parameters, as well as passing parameters to \code and \qml commands. Use these together with the new \QtMinorVersion macro to automate bumping the QML import versions within documentation. Task-number: QTBUG-67818 Change-Id: I8b5300749880421a0d7cdacc1b2c0f96b3b7ef67 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/qml/doc/src')
-rw-r--r--src/qml/doc/src/qmltypereference.qdoc14
-rw-r--r--src/qml/doc/src/qtqml.qdoc9
-rw-r--r--src/qml/doc/src/statemachine.qdoc14
3 files changed, 19 insertions, 18 deletions
diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc
index d38f592648..79bfdc7042 100644
--- a/src/qml/doc/src/qmltypereference.qdoc
+++ b/src/qml/doc/src/qmltypereference.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
-\qmlmodule QtQml 2.12
+\qmlmodule QtQml 2.\QtMinorVersion
\title Qt QML QML Types
\ingroup qmlmodules
\brief List of QML types provided by the Qt QML module
@@ -43,19 +43,19 @@ 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.12, and thus it may be
-imported via the following statement:
+The current version of the \c QtQml module is version 2.\QtMinorVersion, and
+thus it may be imported via the following statement:
-\qml
-import QtQml 2.12
+\qml \QtMinorVersion
+import QtQml 2.\1
\endqml
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
-import QtQuick 2.12
+\qml \QtMinorVersion
+import QtQuick 2.\1
\endqml
See the \l{Qt Quick} module documentation for more information about the \c
diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc
index a964534fec..68d2b66950 100644
--- a/src/qml/doc/src/qtqml.qdoc
+++ b/src/qml/doc/src/qtqml.qdoc
@@ -55,11 +55,12 @@ following directive:
#include <QtQml>
\endcode
-The QML types in Qt QML are available through the \c QtQML import. To use the
+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:
-\code
-import QtQml 2.12
-\endcode
+
+\qml \QtMinorVersion
+import QtQml 2.\1
+\endqml
To link against the module, add this line to your \l qmake \c
diff --git a/src/qml/doc/src/statemachine.qdoc b/src/qml/doc/src/statemachine.qdoc
index 59170a223f..6986f1baa0 100644
--- a/src/qml/doc/src/statemachine.qdoc
+++ b/src/qml/doc/src/statemachine.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtQml.StateMachine 1.11
+ \qmlmodule QtQml.StateMachine 1.\QtMinorVersion
\title Declarative State Machine QML Types
\brief Provides QML types to create and execute state graphs.
@@ -68,9 +68,9 @@
\e{QtQml.StateMachine} \e{last}. This way, the \e{State} type is provided
by the Declarative State Machine Framework and not by \l{QtQuick}:
- \qml
- import QtQuick 2.0
- import QtQml.StateMachine 1.0
+ \qml \QtMinorVersion
+ import QtQuick 2.\1
+ import QtQml.StateMachine 1.\1
StateMachine {
State {
@@ -82,9 +82,9 @@
Alternatively, you can import \e{QtQml.StateMachine} into a separate
namespace to avoid any ambiguity with QtQuick's \e{State} item:
- \qml
- import QtQuick 2.0
- import QtQml.StateMachine 1.0 as DSM
+ \qml \QtMinorVersion
+ import QtQuick 2.\1
+ import QtQml.StateMachine 1.\1 as DSM
DSM.StateMachine {
DSM.State {