Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15456

Enumerators whose name begin with a non-capital letter are undefined in QML

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.7.1
    • None
    • Windows XP Professional (Version 2002, Service Pack 3) and Mac Os X Snow Leopard (Version 10.6.5).

    Description

      Only enumerators whose name begins with a capital letter are recognized in QML code. For example, if one defines the following enumerated type in a class and then reveals it to QML, only the first, the second, and the fourth enumerators are recognized and the other two are undefined:

      enum Type

      { Other = 0, TypeA, typeB, TypeC, tYPEd }

      There is no such limitation in C++ in general.

      Attachments

        1. enum.pro
          0.2 kB
          P-H Niemenlehto
        2. enum.qrc
          0.1 kB
          P-H Niemenlehto
        3. foo.h
          0.3 kB
          P-H Niemenlehto
        4. main.cpp
          0.3 kB
          P-H Niemenlehto
        5. ui.qml
          0.4 kB
          P-H Niemenlehto

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              aakenned Aaron Kennedy
              phn P-H Niemenlehto
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes