Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

id-based translations fails when there's enum in a QML file



  • Hi, it's me again, first of all I would like to say sorry about the previous post since I didn't correctly explain my question( I deleted it).
    My question is: I am using id-based translations in QML files, I found that if there's enum declaration in a QML file, lupdate command can't detect some translation entries in that file. By running lupdate it gives error messages like:

    error: Unexpected token `reserved word'
       enum TickPos{
    
    error: Expected token `:'
    EnLeft, // Enum member
    

    Enums are declared as:

    enum TickPos{
           EnLeft,
           EnCenter,
           EnRight
       }
    

    lupdate can successfully detect all translation entries if I delete the enum declration. Could you please kindly advise me on this issue? Thank you very much


Log in to reply