]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodel.cpp
Merge remote-tracking branch 'origin/master' into frameworks
[dolphin.git] / src / kitemviews / kfileitemmodel.cpp
index 33b29c9fcb5cd6dd4576b915dd04e15c6a8c1027..4d5879f4da02781c9ea57f22841a804007529b85 100644 (file)
@@ -451,6 +451,8 @@ void KFileItemModel::setRoles(const QSet<QByteArray>& roles)
     if (m_roles == roles) {
         return;
     }
+
+    const QSet<QByteArray> changedRoles = (roles - m_roles) + (m_roles - roles);
     m_roles = roles;
 
     if (count() > 0) {
@@ -479,8 +481,7 @@ void KFileItemModel::setRoles(const QSet<QByteArray>& roles)
             m_itemData[i]->values = retrieveData(m_itemData.at(i)->item, m_itemData.at(i)->parent);
         }
 
-        kWarning() << "TODO: Emitting itemsChanged() with no information what has changed!";
-        emit itemsChanged(KItemRangeList() << KItemRange(0, count()), QSet<QByteArray>());
+        emit itemsChanged(KItemRangeList() << KItemRange(0, count()), changedRoles);
     }
 
     // Clear the 'values' of all filtered items. They will be re-populated with the
@@ -2246,4 +2247,3 @@ bool KFileItemModel::isConsistent() const
     return true;
 }
 
-#include "kfileitemmodel.moc"