diff options
author | Jerome Pasion <jerome.pasion@qt.io> | 2020-11-20 14:30:21 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-11-26 18:48:47 +0000 |
commit | 0f0d39c708f5be77a4a9cf9491e64c8a42770c4c (patch) | |
tree | 9c818e36fab45678068ef2e415feac98849c4a20 /src | |
parent | a5d2a7a2c8698f2848d54207957e2b059683048d (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
Change-Id: I3ac44f93aab3086c1a49de79ecc677beb4ef9180
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 72746ef0ad69d589de91f43aa2043d6e47745d68)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/folderlistmodel/qquickfolderlistmodel.cpp | 6 | ||||
-rw-r--r-- | src/imports/labsmodels/qqmldelegatecomponent.cpp | 8 | ||||
-rw-r--r-- | src/imports/localstorage/qquicklocalstorage.cpp | 4 | ||||
-rw-r--r-- | src/imports/models/plugin.cpp | 2 | ||||
-rw-r--r-- | src/imports/qtqml/plugin.cpp | 2 | ||||
-rw-r--r-- | src/imports/wavefrontmesh/qwavefrontmesh.cpp | 2 | ||||
-rw-r--r-- | src/imports/workerscript/plugin.cpp | 2 | ||||
-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 | ||||
-rw-r--r-- | src/qmltest/doc/src/qtquicktest-qmltypes.qdoc | 2 | ||||
-rw-r--r-- | src/quick/doc/src/concepts/effects/particles.qdoc | 6 | ||||
-rw-r--r-- | src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc | 12 | ||||
-rw-r--r-- | src/quick/doc/src/qmltypereference.qdoc | 5 | ||||
-rw-r--r-- | src/quickshapes/qquickshape.cpp | 2 |
15 files changed, 47 insertions, 49 deletions
diff --git a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp index 342fc77aaa..bf2725274d 100644 --- a/src/imports/folderlistmodel/qquickfolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qquickfolderlistmodel.cpp @@ -224,7 +224,7 @@ QString QQuickFolderListModelPrivate::resolvePath(const QUrl &path) To use this module, import the module with the following line: - \qml \QtMinorVersion + \qml import Qt.labs.folderlistmodel \endqml */ @@ -244,7 +244,7 @@ QString QQuickFolderListModelPrivate::resolvePath(const QUrl &path) \e{Elements in the Qt.labs module are not guaranteed to remain compatible in future versions.} - \qml \QtMinorVersion + \qml import Qt.labs.folderlistmodel \endqml @@ -291,7 +291,7 @@ QString QQuickFolderListModelPrivate::resolvePath(const QUrl &path) The following example shows a FolderListModel being used to provide a list of QML files in a \l ListView: - \qml \QtMinorVersion + \qml import QtQuick import Qt.labs.folderlistmodel diff --git a/src/imports/labsmodels/qqmldelegatecomponent.cpp b/src/imports/labsmodels/qqmldelegatecomponent.cpp index 2de6b55045..dc644d3095 100644 --- a/src/imports/labsmodels/qqmldelegatecomponent.cpp +++ b/src/imports/labsmodels/qqmldelegatecomponent.cpp @@ -180,10 +180,10 @@ bool QQmlDelegateChoice::match(int row, int column, const QVariant &value) const sliders, radio buttons, and other visualizations based on the type of each setting. In this case, DelegateChooser could provide an easy way to associate a different type of delegate with each setting: - \qml \QtMinorVersion - import QtQuick 2.\1 - import QtQuick.Controls 2.\1 - import Qt.labs.qmlmodels 1.0 + \qml + import QtQuick + import QtQuick.Controls + import Qt.labs.qmlmodels ListView { width: 200; height: 400 diff --git a/src/imports/localstorage/qquicklocalstorage.cpp b/src/imports/localstorage/qquicklocalstorage.cpp index 0a66126fa9..4f74c9bd95 100644 --- a/src/imports/localstorage/qquicklocalstorage.cpp +++ b/src/imports/localstorage/qquicklocalstorage.cpp @@ -545,7 +545,7 @@ through the data. To use the types in this module, import the module and call the relevant functions using the \c LocalStorage type: - \qml \QtMinorVersion + \qml import QtQuick import QtQuick.LocalStorage @@ -575,7 +575,7 @@ using the Offline Storage API. \section3 Open or Create a Database -\qml \QtMinorVersion +\qml import QtQuick.LocalStorage as Sql db = Sql.openDatabaseSync(identifier, version, description, estimated_size, callback(db)) diff --git a/src/imports/models/plugin.cpp b/src/imports/models/plugin.cpp index 9a25fd3ad1..7547acb253 100644 --- a/src/imports/models/plugin.cpp +++ b/src/imports/models/plugin.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE To use the types in this module, import the module with the following line: - \qml \QtMinorVersion + \qml import QtQml.Models \endqml diff --git a/src/imports/qtqml/plugin.cpp b/src/imports/qtqml/plugin.cpp index 5b9dcd9ec9..31a40bbe4c 100644 --- a/src/imports/qtqml/plugin.cpp +++ b/src/imports/qtqml/plugin.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE To use the types in this module, import the module with the following line: - \qml \QtMinorVersion + \qml import QtQml \endqml */ diff --git a/src/imports/wavefrontmesh/qwavefrontmesh.cpp b/src/imports/wavefrontmesh/qwavefrontmesh.cpp index 4523e30790..6be5c3d73f 100644 --- a/src/imports/wavefrontmesh/qwavefrontmesh.cpp +++ b/src/imports/wavefrontmesh/qwavefrontmesh.cpp @@ -91,7 +91,7 @@ public: To use this module, import the module with the following line: - \qml \QtMinorVersion + \qml import Qt.labs.wavefrontmesh \endqml */ diff --git a/src/imports/workerscript/plugin.cpp b/src/imports/workerscript/plugin.cpp index 28577d9768..55b88cb9b7 100644 --- a/src/imports/workerscript/plugin.cpp +++ b/src/imports/workerscript/plugin.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE To use the types in this module, import the module with the following line: - \qml \QtMinorVersion + \qml import QtQml.WorkerScript \endqml */ 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 diff --git a/src/qmltest/doc/src/qtquicktest-qmltypes.qdoc b/src/qmltest/doc/src/qtquicktest-qmltypes.qdoc index c41d34a8d3..d7cada0db2 100644 --- a/src/qmltest/doc/src/qtquicktest-qmltypes.qdoc +++ b/src/qmltest/doc/src/qtquicktest-qmltypes.qdoc @@ -33,7 +33,7 @@ You can import this module using the following statement: - \qml \QtMinorVersion + \qml import QtTest \endqml diff --git a/src/quick/doc/src/concepts/effects/particles.qdoc b/src/quick/doc/src/concepts/effects/particles.qdoc index d0d86e9167..20c721a0cd 100644 --- a/src/quick/doc/src/concepts/effects/particles.qdoc +++ b/src/quick/doc/src/concepts/effects/particles.qdoc @@ -33,7 +33,7 @@ This QML module contains a particle system for Qt Quick. To use these types, import the module with the following line: - \qml \QtMinorVersion + \qml import QtQuick.Particles \endqml @@ -51,8 +51,8 @@ To use the types from the particles module, import the module with the following line: - \qml \QtMinorVersion - import QtQuick.Particles 2.\1 + \qml + import QtQuick.Particles \endqml \section1 The ParticleSystem diff --git a/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc b/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc index abfff7cc11..2c492cdca2 100644 --- a/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc +++ b/src/quick/doc/src/guidelines/qtquick-bestpractices.qdoc @@ -197,9 +197,9 @@ so. To explain why, let's take a look at a simplified example. Suppose we were writing the UI for a settings page: -\qml \QtMinorVersion - import QtQuick 2.\1 - import QtQuick.Controls 2.\1 +\qml + import QtQuick + import QtQuick.Controls Page { Button { @@ -296,9 +296,9 @@ into QML: The QML then calls the C++ slot directly: -\qml \QtMinorVersion - import QtQuick 2.\1 - import QtQuick.Controls 2.\1 +\qml + import QtQuick + import QtQuick.Controls Page { Button { diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc index 45677ce386..9d79ac862b 100644 --- a/src/quick/doc/src/qmltypereference.qdoc +++ b/src/quick/doc/src/qmltypereference.qdoc @@ -34,10 +34,9 @@ The \l{Qt Quick} module provides graphical primitive types. These types are only available in a QML document if that document imports the \c QtQuick namespace. -The current version of the \c QtQuick module is version \QtMinorVersion, and -thus it may be imported via the following statement: +To use the module, import the \c QtQuick module with the following statement: -\qml \QtMinorVersion +\qml import QtQuick \endqml diff --git a/src/quickshapes/qquickshape.cpp b/src/quickshapes/qquickshape.cpp index e16911de49..6f1087737b 100644 --- a/src/quickshapes/qquickshape.cpp +++ b/src/quickshapes/qquickshape.cpp @@ -67,7 +67,7 @@ Q_LOGGING_CATEGORY(QQSHAPE_LOG_TIME_DIRTY_SYNC, "qt.shape.time.sync") To use the types in this module, import the module with the following line: - \qml \QtMinorVersion + \qml import QtQuick.Shapes \endqml */ |