aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-01-30 13:22:37 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-01-30 14:58:11 +0000
commit9e4f6d92111bff0d422609704673cc0d9a46cafd (patch)
tree1975f0c8769725558c2e47f20fadd12a9cb31879
parent718f3469f693eb179f1504a41b18280656a2325d (diff)
Doc: Clarify syntax of module URIs
No, you cannot use kebab case. Pick-to: 6.5 6.4 6.2 Fixes: QTBUG-106074 Change-Id: I9e3bdfd71d40177f16c99330ffc51d899384f407 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
-rw-r--r--src/qml/doc/src/cmake/qt_add_qml_module.qdoc9
-rw-r--r--src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc4
2 files changed, 12 insertions, 1 deletions
diff --git a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
index e12b3a6f24..1bb1c1c281 100644
--- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
+++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
@@ -363,6 +363,13 @@ alphanumeric or dot characters. Other QML modules may use this name in
\l{Module Definition qmldir Files}{qmldir} file. The \c URI is also used to
form the \e{target path} by replacing dots with forward slashes.
+See \l{qtqml-modules-identifiedmodules.html}{Identified Modules} for further
+in-depth discussion of the module URI. In particular, mind that in order for
+the module to be importable from QML, each segment of its URI must be a
+well-formed ECMAScript Identifier Name. This means, for example, the segments
+must not start with a number and they must not contain \e{-} (minus)
+characters.
+
\section2 Versions
A QML module can also define a \c VERSION in the form \c{Major.Minor}, where
@@ -371,7 +378,7 @@ component may be appended, but will be ignored. A list of earlier major
versions the module provides types for can also optionally be given after the
\c PAST_MAJOR_VERSIONS keyword (see below).
See \l{qtqml-modules-identifiedmodules.html}{Identified Modules} for further
-in-depth discussion of the module URI and version numbering,
+in-depth discussion of version numbering,
\l{Registering past major versions} for registering past major versions, and
\l{Keeping module versions in sync} for keeping module versions in sync.
diff --git a/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
index 6e8751af70..21af556287 100644
--- a/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
+++ b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
@@ -20,6 +20,10 @@ Identified modules must be installed into the
\l{qtqml-syntax-imports.html#qml-import-path}{import path} in order to be found
by the QML engine.
+Syntactically, each dot-separated segment of the URI must be a well-formed
+ECMAScript Identifier Name. This means, for example, the segments must not start
+with a number and they must not contain \e{-} (minus) characters.
+
\section1 Locally Installed Identified Modules
A directory of QML and/or C++ files can be shared as an identified module if it