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

Base types of (generalized) grouped properties

    XMLWordPrintable

Details

    Description

       

      1 import QtQuick
      2 
      3 Item {
      4     id: root
      5     PropertyChanges {
      6         root.whatever: 1
                ^^^^
      7     }
      8 } 

      The highlighted scope has scope type GroupedPropertyScope.
      Its base type is the component with id root at 3:1.

       

      The grouped property here isn't a type but a 'reference' to a type. Using its base type to hold the referenced type is somewhat confusing as then the meaning of the base type depends on the scope type and is implicit.

       

      In the example code above, the referenced type is a parent of the grouped property. This led to a situation (QTBUG-137035) where when iterating child scopes and their base types we ended up in an infinite loop due to this cycle. 

       

      Maybe the referenced type should be stored separately from the base type field to avoid this confusion. Or maybe we should expose the same field through two different methods which would communicate the underlying assumption and assert on the scope type.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            olivier.decanniere Olivier De Cannière
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes