From c2533317f2af3005eb28f40aafa428e4553f078a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 7 Dec 2011 18:35:30 +0100 Subject: 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. --- src/kitemviews/kfileitemmodelrolesupdater.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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()); } -- cgit v1.3