aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-01-31 10:51:32 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-01-31 22:41:47 +0100
commita29f3160898823cb300172c57ff6a7cd7bb74aba (patch)
treeea545f00948ef3c158daa5d0922137cd2a69e748 /src
parent66bc0019684519e6ccf3c9910c1bbd9902a13911 (diff)
Doc: Disambiguate description of module URIs
While you can, technically, have URIs that contain '$', or '幽', '霊', '文', and '字', you really shouldn't. Amends commit 9e4f6d92111bff0d422609704673cc0d9a46cafd. Pick-to: 6.5 6.4 6.2 Fixes: QTBUG-106074 Change-Id: Ic0f13b6ea2bb704d2bd9f4fa5841aa69a88cd5a7 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Semih Yavuz <semih.yavuz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/doc/src/cmake/qt_add_qml_module.qdoc14
-rw-r--r--src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc4
2 files changed, 10 insertions, 8 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 1bb1c1c281..857779af2d 100644
--- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
+++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
@@ -356,19 +356,19 @@ libraries, or as a static library otherwise. This choice can be explicitly
overridden with the \c STATIC or \c SHARED options.
Every QML module must define a \c URI. It should be specified in dotted URI
-notation, such as \c{QtQuick.Layouts}. It must not contain anything other than
-alphanumeric or dot characters. Other QML modules may use this name in
+notation, such as \c{QtQuick.Layouts}. Each segment 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. As the \c URI will be translated into directory names, you
+should restrict it to alphanumeric characters of the latin alphabet,
+underscores, and dots. Other QML modules may use this name in
\l{qtqml-syntax-imports.html}{import statements} to import the module. The
\c URI will be used in the \c module line of the generated
\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.
+in-depth discussion of the module URI.
\section2 Versions
diff --git a/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
index 21af556287..fff697dd8e 100644
--- a/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
+++ b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
@@ -22,7 +22,9 @@ 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.
+with a number and they must not contain \e{-} (minus) characters. As the URI
+will be translated into directory names, you should restrict it to alphanumeric
+characters of the latin alphabet, underscores, and dots.
\section1 Locally Installed Identified Modules