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

Initialization behavior difference between precompiled and not compiled QML component

    XMLWordPrintable

Details

    • 92b107aed (dev), 18eb16e42 (6.6), c05aa74c7 (tqtc/lts-6.5)

    Description

      Enum types are not set during beginCreate when the component is compiled through qmlcachegen. To reproduce:

      $ ./attachedpropertiesoncreate  
      Attached property int value: QVariant(int, 42)
      Attached property enum value: QVariant(TestItem::EnumValue, TestItem::Value42)
      Attached property int value: QVariant(int, 42)
      Attached property enum value: QVariant(TestItem::EnumValue, TestItem::Value42)
      

      Then try compiling the main.qml file and run:

      $ qmlcachegen main.qml  
      $ ./attachedpropertiesoncreate  
      Attached property int value: QVariant(int, 42)
      Attached property enum value: QVariant(TestItem::EnumValue, TestItem::NoValue)
      Attached property int value: QVariant(int, 42)
      Attached property enum value: QVariant(TestItem::EnumValue, TestItem::Value42)
      

      While this probably isn't a bug in itself as it eventually is set, it would be nice if the behavior matched.

      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
              poikelin Joni Poikelin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes