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

When using DelegateModelGroup to group items then when a created item which is set to not be included will trigger an assert

    XMLWordPrintable

    Details

    • Platform/s:
      All
    • Sprint:
      Bug Fixing Candidates

      Description

      When using DelegateModelGroup to group items then when a created item which is set to not be included will trigger an assert. In the case of the example which is set up to have a DelegateModelGroup with a custom name (selected) and that is set to be included by default. Then when the items are added to that group on creation, then when it hits the delegate's onCompleted handler and it sets the DelegateModel.inSelected to false it will trigger the assert:

      ASSERT: "index >=0 && index < count(group)" in file /Users/andy/dev/qt5.15/qtdeclarative/src/qmlmodels/qqmllistcompositor.cpp, line 365
      

      If this is bypassed (in release mode) then when you replace one model with the other (as the example does when you press a key) then it does not remove all the entries in the list as a result. But I suspect that problem is connected to the fact that it is asserting before, so fixing that should solve this one.

        Attachments

        1. visibletest.zip
          3 kB
        2. qtbug86708.zip
          4 kB
        3. main.qml
          1 kB

          Issue Links

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

            Activity

              People

              Assignee:
              smd Jan Arve
              Reporter:
              andysh Andy Shaw
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: