No more unknown icons
Review Request #111396 - Created July 4, 2013 and submitted - Latest diff uploaded
A disadvantage of my recent changes in KFileItemModelRolesUpdater is that one can actually see "unknown" icons when scrolling quickly to another part of the view in directories with many items. I tried to minimize the risk that this happens by spending some time (of the 200 ms which we always accept for synchronous updates) for loading icons of all items without determining the mime type. But in directories with many items, this is not enough. Maybe it's better to just load icons for items which do not have an icon yet on demand, i.e., just before the widget is shown on the screen. After David's recent improvements in KFileItem, KFileIcon::iconName() should be fast enough.
I never see unknown icons any more, and the performance still feels similar. If anyone sees regressions with this commit, please let me know!