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

Repeater's removed signals are thrown with wrong arguments on clear

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.5.0
    • 5.4.0 Beta
    • None
    • Qt 5.4.0
      MacOS X 10.10
    • 9d1cd3098a066c7b6689d4776bfd3a25621a26fc

    Description

      QQuickRepeater::setModel calls ::clear which iterates all items from 0 to size and emites 'removed' signal for all of them.
      The problem is that if we have 3 items the order of signals is the following:
      1. removed(0);
      2. removed(1);
      3. removed(2); // Oops, size is 1 and we already don't have item at index 1

      Looks like items have to be iterated in reverse order or removed signal argument should be fixed accordingly to current number of elements.

      Attachments

        For Gerrit Dashboard: QTBUG-42243
        # Subject Branch Project Status CR V

        Activity

          People

            w00t Robin Burchell
            elessar Ruslan Nigmatullin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes