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

qmlsc: Compilation errors with enums

    XMLWordPrintable

Details

    • Windows
    • 3f3e961a5a (qt/qtdeclarative/dev) 3f3e961a5a (qt/tqtc-qtdeclarative/dev) 00462982f2 (qt/qtdeclarative/6.4) 00462982f2 (qt/tqtc-qtdeclarative/6.4)

    Description

      qmlsc/qmlint shows an error when using enums. The problem happens with all enums of the format XX::Enum (e.g. QQuickLoader::Status). Example:

      Loader {
      	id: loader
      
      	property int someValue: 10
      
      	Binding {
      		target: loader.item
      		property: "someValue"
      		value: loader.someValue
      		when: loader.status == Loader.Ready // error
      		restoreMode: Binding.RestoreValue
      	}
      }
      
      error: Could not compile binding for when: Cannot generate efficient code for content pointer of non-QVariant wrapper type double of QQuickLoader::status with type Status
      

      Also interesting is that the error message says "double" although the data type should be int.

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              Harald Meyer Harald Meyer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes