Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2
Description
You can reproduce this on tst_qmltyperegistrar:
1. Build tst_qmltyperegistrar (fresh build works fine, so this is needed)
2. Go to qtdeclarative/tests/auto/qml/qmltyperegistrar/hppheader.hpp
3. Add new property to HppClass, say:
Q_PROPERTY(int invisibleProperty READ invisibleProperty) // boilerplate reader and member variable
4. Rebuild tst_qmltyperegistrar
moc_hppheader.cpp.json under <build path>/tst_qmltyperegistrar_autogen/ (which I guess is used to generate the tst_qmltyperegistrar.qmltypes) is updated correctly and contains new property entry for "inivisibleProperty".
tst_qmltyperegistrar.qmltypes, however, is not updated and there's no "invisibleProperty".
Looks like we don't have a proper CMake dependency between MOC's json and qmltyperegistrar/qmltypes, so whenever the json changes, qmltypes becomes outdated. This is super confusing when e.g. you add new property to C++ class then use that in QML file and running qmllint returns "no property foobar" (when it should actually be correctly registered).