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

Make QSortFilterProxyModel more robust in the case of nested remove/insertRows

XMLWordPrintable

      QSortFilterProxyModel could use a stack to keep track of changes to the source model, similar in concept to what we do with managing persistent model indexes in QAbstractItemModel.

      I.e. in source_items_about_to_be_removed(), the items to be removed shouldn't be removed straight away, but rather be pushed on the stack; then in source_items_removed(), the stack is popped and we update both source_to_proxy and proxy_to_source at the same time, so they're in sync.

      This should fix the bug in task 167273 in the right(tm) way, from the QSortFilterProxyModel perspective.

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

            bjnilsen Bjørn Erik Nilsen
            ezf ezf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes