Stop cycling if index is invalid

CCBUG: 505015

There are several ways to trigger the message: dataChanged() called with an invalid index range

This is Qt reporting that kpa tried to update a cell but the thumbnail is no longer in the current view. Qt falls back to updating the entire view if the index is invalid.

This patch addresses one way to trigger the message (so only part of fixing the bug report): a mouse-over of a video thumbnail starts kpa cycling the thumbnail. If the cycle animation is running when the user changes to a different view, the cycler attempts to update the cell for the video thumbnail but its index is now invalid.

To see this in the demo:

  • from home, click media type and video
  • mouse over the video thumbnail to start it cycling
  • go home, then eg. People and click Donna
  • when the cycler attempts to update the video thumbnail, the message is logged

The patch only emits dataChanged if the index is valid, and stops the cycler if the index is invalid.

Merge request reports

Loading