Make sure that icons are determined for the visible items first

Review Request #109843 - Created April 3, 2013 and submitted

Frank Reininghaus
When entering a large folder, it can happen that KFileItemModelRolesUpdater starts its synchronous determination of icon names before the view has informed it about the visible index range. This causes the problem that some visible icons might still be unkown after 200 ms, and that "unknown" icons are then replaced by the right ones asynchronously.

I propose to fix this by assuming that the first items are visible if we don't have a valid index range yet. The max. number of visible items is determined by the view, and a default value of 100 is used.
Works for me (tested by artificially making the resolving of the roles for an item slower).
Emmanuel Pescosta
Commit Hook
Frank Reininghaus
Review request changed

Status: Closed (submitted)