summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2011-02-08 12:33:03 +0100
committermae <qt-info@nokia.com>2011-02-08 12:44:15 +0100
commitdd49b322b327fe87d8420abcce0e6cee877a88d7 (patch)
tree61a87a94773ca7cc209bcf92967ec5f39bef732a /doc
parent77bd529c04b2f08ca40a282a3ff20df699b27295 (diff)
downloadqt4-tools-dd49b322b327fe87d8420abcce0e6cee877a88d7.tar.gz
Support seperate versions of installed modules
QML supports versioned types in modules. There's a version major and a version minor. This makes it possible to have a module com.organisation.fancycomponents with version 1.0, and later you could ship a new module com.organisation.fancycomponents which contains a more recent version 1.1 or 2.0 AND also the old versions to keep old code running. This is good. The problem is that this is difficult with certain QA procedures. It's hard to verify that a new module is indeed 100% compatible with the previous versions. The change extends the import mechanism by adding optional versioning to the component patch. With the patch, you can add a new module com.organisation.fancycomponents.2.0 which will be loaded when the QML file specifies "import com.organisation.fancycomponents 2.0". The patch works as follows: if you try to load com.organisation.fancycomponents in version 2.0, the engine first looks for com/organisation/fancycomponents.2.0, then for com/organisation/fancycomponents.2 then for com.organisation/fancycomponents. Reviewed-by: Aaron Kennedy Task-number: QTBUG-16455
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/modules.qdoc9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index 1dca28c593..4b2b33a8e1 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -134,6 +134,15 @@ Installed modules that are installed into the import path or created
as a \l{QDeclarativeExtensionPlugin}{QML C++ plugin} must define a
\l{Writing a qmldir file}{qmldir file}.
+Modules that are installed into the import path translate the URI into
+directory names. For example, the qmldir file of the module \c com.nokia.qml.mymodule
+must be located in the subpath \c com/nokia/qml/mymodule/qmldir somewhere in the
+QML import path. In addition it is possible to store different versions of the
+module in subdirectories of its own. For example, a version 2.1 of the
+module could be located under \c com/nokia/qml/mymodule.2/qmldir or
+\c com/nokia/qml/mymodule.2.1/qmldir. The engine will automatically load
+the module which matches best.
+
\section2 The QML import path