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

qml: list qml --> c++ editing crashes/has no effect

    XMLWordPrintable

Details

    • fc0bf5a9f (dev)

    Description

      Since pretty recently, it became possible to edit c++-backed lists in qml. (Implement array methods for QQmlListProperty)

      Using such editing for dynamically updating some parts of ui based on either model-view data or plug-in modules/ui code often crashe or does not work. See reproducers attached.

              Instantiator {
                  delegate: ..{}
                  onObjectAdded: (index, object) => {
                      container.property.splice(index, 0, object)
                  }
                  onObjectRemoved: ...

      The qt code/commit in question tries to insert nullpointers without any reason, and most properties(qt github search cant handle and crash or discard (random) items.
      On top of that, complexity is (more than)quadratic for list _slow fallbacks.
      Proposed patches attached.

      Attachments

        1. qt_patches_qmllist.zip
          4 kB
        2. qtbug_qmllistprop_.zip
          19 kB
        3. stacktrace.txt
          6 kB
        4. stacktrace2.txt
          4 kB
        5. stacktrace3.txt
          3 kB

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              antony.kikaxa A I
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are 3 open Gerrit changes