┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemmodelrolesupdater.h
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-06-20 19:13:35 +0200
committerFrank Reininghaus <[email protected]>2013-06-20 19:13:35 +0200
commit015957c5a2fb0fed52e1101fb1f67f1f691e799f (patch)
tree171e3a83a2260dc07ce1c2f8d4791c3d517cc9af /src/kitemviews/kfileitemmodelrolesupdater.h
parent4b8c4124cb39d1b6b109ff6dbdb6536a0f2d408b (diff)
Make sure that all visible items have an icon
We try to determine "final" icons, i.e., icons with known mime type, for 200 ms. If this does not succeed, we at least load "fast" icons, i.e., load the icons without determining the mime type. REVIEW: 111009
Diffstat (limited to 'src/kitemviews/kfileitemmodelrolesupdater.h')
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h
index 2a5a4041c..605c36f81 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.h
+++ b/src/kitemviews/kfileitemmodelrolesupdater.h
@@ -224,6 +224,15 @@ private:
void startUpdating();
/**
+ * Loads the icons for the visible items. After 200 ms, the function
+ * stops determining mime types and only loads preliminary icons.
+ * This is a compromise that prevents that
+ * (a) the GUI is blocked for more than 200 ms, and
+ * (b) "unknown" icons could be shown in the view.
+ */
+ void updateVisibleIcons();
+
+ /**
* Creates previews for the items starting from the first item in
* m_pendingPreviewItems.
* @see slotGotPreview()
@@ -311,11 +320,6 @@ private:
// Items for which the sort role still has to be determined.
QSet<KFileItem> m_pendingSortRoleItems;
- // While the sort role is being resolved, we also keep the indexes
- // in a sorted list. The reason is that this enables us to determine
- // both the sort role and the icon for the visible items first.
- QList<int> m_pendingSortRoleIndexes;
-
// Indexes of items which still have to be handled by
// resolveNextPendingRoles().
QList<int> m_pendingIndexes;