diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-03-25 14:13:50 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-04-03 20:37:18 +0200 |
commit | 6314d305ee0d9064ca848980ef2dab1793c191b8 (patch) | |
tree | 9b0b471a41a3171e7938c0e99842aa12404105e4 /src/qml/doc/src/cmake/qt_add_qml_module.qdoc | |
parent | aa2e2333376cefd1c7b8c3931097eb6dd4b96dd9 (diff) |
Generate qmldir files for extra directories with QML files
Those qmldir files contain only a prefer directive for the canonical
resource location of the module. This way, any time another component
from the implicit import is requested, it will not be located in the
extra directory (where it probably doesn't exist), but instead in the
canonical location.
Since people may have manually written qmldir files with different
content in those places, or worse, relied on the other components to be
inaccessible, we need a new policy to opt into this.
Fixes: QTBUG-111763
Change-Id: If236feb7dd7c8d704b813ea56482ff758799d0a7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/doc/src/cmake/qt_add_qml_module.qdoc')
-rw-r--r-- | src/qml/doc/src/cmake/qt_add_qml_module.qdoc | 6 |
1 files changed, 6 insertions, 0 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 94a7a9d67f..4ca7635b9c 100644 --- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc +++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc @@ -171,6 +171,12 @@ The \l OUTPUT_DIRECTORY argument determines where the \c qmldir and typeinfo files will be written to. If the QML module has a plugin, that plugin will also be created in the same directory as the \c qmldir file. +If \l{QTP0004} policy is set to \c NEW, for each further directory that contains +\c{.qml} files another \c qmldir file is generated. These extra \c qmldir files +merely redirect to the module's base directory via a \c prefer directive. This +is so that all the QML components in a module can access each other, no matter +which directory they are stored in. + If using a statically built Qt, the backing target's \c{.qml} files will be scanned during the CMake configure run to determine the imports used by the module and to set up linking relationships (the \c{NO_IMPORT_SCAN} keyword |