+ *
+ * To prevent a huge CPU and I/O load, these roles are not updated for all
+ * items, but only for the visible items, some items around the visible area,
+ * and the items on the first and last pages of the view. This is a compromise
+ * that aims to minimize the risk that the user sees items with unknown icons
+ * in the view when scrolling or pressing Home or End.
+ *
+ * Determining the roles is done in several phases:
+ *
+ * 1. If the sort role is "slow", it is determined for all items. If this
+ * cannot be finished synchronously in 200 ms, the remaining items are
+ * handled asynchronously by \a resolveNextSortRole().
+ *
+ * 2. The function startUpdating(), which is called if either the sort role
+ * has been successfully determined for all items, or items are inserted
+ * in the view, or the visible items might have changed because items
+ * were removed or moved, tries to determine the icons for all visible
+ * items synchronously for 200 ms. Then:
+ *
+ * (a) If previews are disabled, icons and all other roles are determined
+ * asynchronously for the interesting items. This is done by the
+ * function \a resolveNextPendingRoles().
+ *
+ * (b) If previews are enabled, a \a KIO::PreviewJob is started that loads
+ * the previews for the interesting items. At the same time, the icons
+ * for these items are determined asynchronously as fast as possible
+ * by \a resolveNextPendingRoles(). This minimizes the risk that the
+ * user sees "unknown" icons when scrolling before the previews have
+ * arrived.
+ *
+ * 3. Finally, the entire process is repeated for any items that might have
+ * changed in the mean time.