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

Item change listener loops break on listener removal

    XMLWordPrintable

Details

    • 35d500526990fafe5b71d97b051a770a2a81e82a

    Description

      All listeners should get invoked, even if they remove themselves while iterating the listeners. An index-based loop would skip the next listener in the list, and an iterator-based or range for loop ends up with invalid iterators unless it makes a (cheap) copy before iterating the listeners.

      The listeners were fixed in https://codereview.qt-project.org/#/c/159505/ but https://codereview.qt-project.org/#/c/155386/ reintroduced the issue for itemGeometryChanged().

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              jpnurmi J-P Nurmi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes