From: Peter Penz Date: Wed, 7 Dec 2011 17:35:30 +0000 (+0100) Subject: Fix issue of unknown icon-types X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/c2533317f2af3005eb28f40aafa428e4553f078a?ds=inline 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. --- 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()); }