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

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

XMLWordPrintable

    • fc0bf5a9f (dev), c4112a6e0 (6.10), cee833288 (dev), 7b572d2e5 (6.10), f51d2a407 (6.9), 00a986e39 (6.9), 1de5dbd39 (tqtc/lts-6.8), 4ef4fb918 (tqtc/lts-6.8), bc5868617 (dev), c66857702 (tqtc/lts-6.5), 3625f098d (6.10), e8eb60337 (tqtc/lts-6.5)

      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.

        1. qtbug_qmllistprop_.zip
          19 kB
        2. qt_patches_qmllist.zip
          4 kB
        3. stacktrace.txt
          6 kB
        4. stacktrace2.txt
          4 kB
        5. stacktrace3.txt
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved: