aboutsummaryrefslogtreecommitdiffstats
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-02-01 16:11:46 +0100
commit3d80fdbd08af83345058c32bddf45a2a7c8fcf43 (patch)
tree0d81b24c3bba7afad1c18fcdfb79c848f558a08a
parentd5b6f586f490414df87d5b65ab1a441e211a8972 (diff)
Doc: Disambiguate description of module URIs
While you can, technically, have URIs that contain '$', or '幽', '霊', '文', and '字', you really shouldn't. Amends commit 9e4f6d92111bff0d422609704673cc0d9a46cafd. 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> (cherry picked from commit a29f3160898823cb300172c57ff6a7cd7bb74aba)
-rw-r--r--src/qml/doc/src/cmake/qt_add_qml_module.qdoc8
-rw-r--r--src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc6
2 files changed, 12 insertions, 2 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 a66aa27561..d0f9a9deff 100644
--- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
+++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
@@ -324,8 +324,12 @@ been created. When \c NO_CREATE_PLUGIN_TARGET is given, \c PLUGIN_TARGET must
also be provided to explicitly name the plugin target.
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
diff --git a/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
index 7054378b07..493b031b60 100644
--- a/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
+++ b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
@@ -44,6 +44,12 @@ 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. 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
A directory of QML and/or C++ files can be shared as an identified module if it