diff options
| author | Frank Reininghaus <[email protected]> | 2013-04-22 21:21:31 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2013-04-22 21:21:31 +0200 |
| commit | 151c8d8c42115717151d88e17b55b60a74b5e791 (patch) | |
| tree | cbead109505cc0ff5a1af078929c4055b565c82a /src/kitemviews/kfileitemmodelrolesupdater.h | |
| parent | ee2d453f1f3f3efa28d6c9cea1d216a45702dfbc (diff) | |
Always determine icons for the visible items first
When entering a folder, KFileItemModelRolesUpdater has not yet been
informed about the visible index range by the view when it tries to
determine icons synchronously. This resulted in the problem that it
tried to determine icons for all items in random order, and some visible
icons were somtimes still unknown after the "synchronous icon loading"
timeout of 200 ms.
This commit tries to improve the situation by loading icons starting
with the first item in increasing order. This should make it less likely
that some visible items still have unknown icons after 200 ms.
BUG: 316129
FIXED-IN: 4.10.3
REVIEW: 109843
Diffstat (limited to 'src/kitemviews/kfileitemmodelrolesupdater.h')
| -rw-r--r-- | src/kitemviews/kfileitemmodelrolesupdater.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index 68559d8dd..b837e8c7f 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -77,6 +77,8 @@ public: */ void setVisibleIndexRange(int index, int count); + void setMaximumVisibleItems(int count); + /** * If \a show is set to true, the "iconPixmap" role will be filled with a preview * of the file. If \a show is false the MIME type icon will be used for the "iconPixmap" @@ -254,6 +256,7 @@ private: QSize m_iconSize; int m_firstVisibleIndex; int m_lastVisibleIndex; + int m_maximumVisibleItems; QSet<QByteArray> m_roles; QSet<QByteArray> m_resolvableRoles; QStringList m_enabledPlugins; |
