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

Item change listener loops break on listener removal

XMLWordPrintable

    • 35d500526990fafe5b71d97b051a770a2a81e82a

      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().

        1. main.qml
          0.6 kB
          Denis Klychkov
        For Gerrit Dashboard: QTBUG-54732
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes