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

Reduce unnecessary detaches and copies when handling value types and lists

    XMLWordPrintable

Details

    Description

      Due to the dual object/value nature of value types and lists, manipulating properties of such types incurs too many copies and detaches. Furthermore, it is hard to grasp when the value:

      1. logically detaches producing two copies that can be observably different.
      2. technically detaches, producing two copies that are synced via the value type and list reference mechanism.

      One tool that might be applied here is a C++-based value type or list reference as extra attribute to Q_PROPERTY. Specifying such an attribute would cause QML to store a pointer to the value in question rather than a copy.

      There are interesting questions about life time management of such pointers in relation to their "parent" values: "Inner" properties and lists of value types and lists would have to be invalidated whenever the property or list changes. "Outer" properties of QObjects would generally be tied to the object's life time.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              ulherman Ulf Hermann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes