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 13:06:21 +0100
commit53505873e9e0246d0caa1051435fc799920029fa (patch)
treeb8191eeb3e1f9e8d4e60365a180d2910dfe25bb1
parent90d4fb5e04a43e6acf4bb59e9ef4cefdf68946f0 (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 b2d9151041..e20876fede 100644
--- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
+++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
@@ -364,8 +364,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 6e8751af70..fff697dd8e 100644
--- a/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
+++ b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc
@@ -20,6 +20,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