From 36df81b3bc6d721d5598d5163b0a9659de4a69ee Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 17 Jun 2020 15:42:05 +0200 Subject: Discern between "auto" and versioned imports in qmldirs You can now import the latest version, a specific version, or, "auto" which is the same version as the parent module. [ChangeLog][QtQml] You can now procedurally add module imports to modules, using qmlRegisterModuleImport(). However, actual import statements in qmldir files should be preferred wherever possible. Fixes: QTBUG-84899 Change-Id: I3b32dd8b07a19d31b6538b9a6bb436840862f345 Reviewed-by: Fabian Kosmale --- src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/qml/doc/src') diff --git a/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc b/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc index e9dc5a043a..0be46f30d2 100644 --- a/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc +++ b/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc @@ -246,6 +246,23 @@ depends MyOtherModule 1.0 load QML (perhaps conditionally) which then depends on other modules. In such cases, the \c depends declaration is necessary to include the other modules in application packages. + \row + \li + \code +import [] + \endcode + \li Declares that this module imports another. + + Example: + \code +import MyOtherModule 1.0 + \endcode + + The types from the other module are made available in the same type + namespace as this module is imported into. Omitting the version + imports the latest version available of the other module, specifying + \c auto as version imports the same version as the version of this + module specified in the QML \c import statement. \row \li -- cgit v1.2.3