mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 17:30:15 +00:00
Implement TODO concerning changed roles
When emitting the itemsChanged signal in KFileItemModel::setRoles,
use the changed roles in the argument of the signal.
A warning message which was related to this issue was removed in
7a83252e0d
REVIEW: 118815
This commit is contained in:
parent
7a593fc92b
commit
efa19caa46
|
@ -449,6 +449,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) {
|
||||
|
@ -477,7 +479,7 @@ void KFileItemModel::setRoles(const QSet<QByteArray>& roles)
|
|||
m_itemData[i]->values = retrieveData(m_itemData.at(i)->item, m_itemData.at(i)->parent);
|
||||
}
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue