]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix issue of unknown icon-types
authorPeter Penz <peter.penz19@gmail.com>
Wed, 7 Dec 2011 17:35:30 +0000 (18:35 +0100)
committerPeter Penz <peter.penz19@gmail.com>
Wed, 7 Dec 2011 17:39:58 +0000 (18:39 +0100)
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

index b8ea1ca77bfc758d7e93105af8481888cba8029a..a55229722c86bd72c1b90cc371718859a0c2047a 100644 (file)
@@ -679,9 +679,8 @@ bool KFileItemModelRolesUpdater::applyResolvedRoles(const KFileItem& item, Resol
             data = rolesData(item);
         }
 
             data = rolesData(item);
         }
 
-        if (mimeTypeChanged || m_clearPreviews) {
-            data.insert("iconName", item.iconName());
-        }
+        data.insert("iconName", item.iconName());
+
         if (m_clearPreviews) {
             data.insert("iconPixmap", QString());
         }
         if (m_clearPreviews) {
             data.insert("iconPixmap", QString());
         }