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

[Regression] Var type properties are not initialized before access is possible

    XMLWordPrintable

Details

    • 5dc7649f5ad7dca6e13707e827d001c3f118a6ef (qtdeclarative)

    Description

      If a component defines a var property with an Array or Object initializer, that property can be accessed before initialization. This causes an error stating that the property is undefined.

      It is difficult to protect against this behavior in more complex use cases since the Component.onCompleted signal ordering is not defined.

      We have primarily observed this behavior with var properties as indicated in the attached example, however we cannot say definitively whether this may happen with basic QML types as well.

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              leonard777 Corey Pendleton
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes