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

Possible crash when removing top rows in a custom tree model/item

    XMLWordPrintable

Details

    Description

      You can get a crash when trying to remove the child rows of the root item if you call removeRows this way:
      removeRows(0, 1, indexFromItem(rootItem));
      instead of
      removeRows(0, 1, QModelIndex());

      It seems that when if you invoke the removeRows the first way, the persistant model index that used to refer the row is still kept in the model.

      Attachments

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes