┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-12-07 18:35:30 +0100
committerPeter Penz <[email protected]>2011-12-07 18:39:58 +0100
commitc2533317f2af3005eb28f40aafa428e4553f078a (patch)
tree2c42a9e373d6a004fe8d60df34d57be91115bfbf /src
parent6c29a1d98a490e585d0e9d9a4eb4824e72756390 (diff)
Fix issue of unknown icon-types
If the split-view is used and/or the Folders Panel is activated it might happen that the "unknown"-icon of an item is shown instead of the correct icon. The root-cause is that one model might already have been resolved the MIME-type of a KFileItem while the other model has not updated the icon yet. As KFileItems are shared the check whether the MIME-type has been resolved is wrong. As at that stage it is assured anyhow that the MIME-type is known just applying the icon-name in any case won't slow down the performance.
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kfileitemmodelrolesupdater.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp
index b8ea1ca77..a55229722 100644
--- a/src/kitemviews/kfileitemmodelrolesupdater.cpp
+++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp
@@ -679,9 +679,8 @@ bool KFileItemModelRolesUpdater::applyResolvedRoles(const KFileItem& item, Resol
data = rolesData(item);
}
- if (mimeTypeChanged || m_clearPreviews) {
- data.insert("iconName", item.iconName());
- }
+ data.insert("iconName", item.iconName());
+
if (m_clearPreviews) {
data.insert("iconPixmap", QString());
}