Details
Description
The `qmlcachegen` tool that generates bytecode for QML behaves differently than when not using pre-compiled QML files (when caching the files at runtime). Please see attached zip-file.
The line
property var eF: Main.Foo
appears similarly in our real code and is intended to create a "shortcut" for the long enumeration name. It has been there for a considerable time and much code relies on this to work in our codebase. However, when we changed to CMake and using the builtin qmlcachegen, it doesn't work anymore and `eF.Bar` yields `undefined`.
property int bar: eF.Bar
[12:54:06.595] warning: qrc:/qt/qml/reproduce/Main.qml:14:5: Unable to assign [undefined] to int
If you add "NO_CACHEGEN", it works as expected, but you won't get syntax-checking at compile time anymore.