Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.0
-
None
Description
The documentation for contents of a "directory listing" qmldir file (https://doc.qt.io/qt-5/qtqml-syntax-directoryimports.html#directory-listing-qmldir-files) defines as syntax for Object Type Declaration only:
<TypeName> <FileName>
Expected would be:
[singleton] <TypeName> <FileName>
So far users have to have and to transfer their knowledge about the "module definition" qmldir file that the important aspect to note a "singleton" aspect of a class already in the qmldir manifest is needed, and guess it works the same way by prepending it on the line.
Otherwise they are left wondering why their code does not work when using singletons.
So it would be needed to have the proper way to annotate a singleton documented also here, to avoid fails and the need for (potentially future-unsafe) guess work.
Compare
https://doc.qt.io/qt-5/qtqml-modules-qmldir.html#contents-of-a-module-definition-qmldir-file