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

Initialization behavior difference between precompiled and not compiled QML component

XMLWordPrintable

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

      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.

        For Gerrit Dashboard: QTBUG-117968
        # Subject Branch Project Status CR V

            ulherman Ulf Hermann
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes