[Interest] Mysterious C++/QML compilation bug

Alexander Dyagilev alervdvcw at gmail.com
Mon Jun 12 16:20:55 CEST 2023


Hello,

In C++ I'm using Q_NAMESPACE + Q_ENUM_NS and export enum to QML (in QML 
I use it like MyCoolEnum.MyCoolValue).

I've found a weird issue: I've inserted a new value in the middle of my 
enum. And all was suddenly broken. I spent 1 hour trying to understand 
what is going on.

Full rebuild was not helping. Then, I just made fake modifications in 
QML files which uses this enum - and all started working again!

So, it appears that QML caches somehow somewhere old enum values and 
does not want to refresh them even after the full rebuild of the app.

Where are this cached files located? I was not able to find them inside 
of the build directory, and this is weird too.



More information about the Interest mailing list