Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
6.8
-
None
Description
ECMAScript resources end up as ScopeModulePrefix with their stored type being void.
This for instance manifests in qmllint creating errorneous warnings in the calqlatr example, like
Member "operatorPressed" not found on type "undefined" [missing-property]
for calls. Non-calling lookups (as in, just accessing the function without calling) fare only slightly better (using a modified calqlatr example):
Warning: /home/fabian/projects/qtdev/qtdoc/examples/demos/calqlatr/Main.qml:21:24: Type not found in namespace [unresolved-type] CalcEngine.operatorPressed ^^^^^^^^^^^^^^^ Warning: /home/fabian/projects/qtdev/qtdoc/examples/demos/calqlatr/Main.qml:21:24: Member "operatorPressed" not found on type "undefined" [missing-property] CalcEngine.operatorPressed
At the very least, they should be treated as `var` by qmllint; ideally, we'd actually collect the known functions and global variables.
Yes, one could convert the example to use a Singleton; that doesn't change the fact that we shouldn't create spurious warnings.