Update hidden state correctly

Summary:
When renaming a file from '.hidden' to 'not_hidden', the file
would still be displayed like a hidden file with a semi-transparent
icon and a grey text.

BUG: 399599

Reviewers: #dolphin, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16115
This commit is contained in:
Thomas Surrel 2018-10-10 22:24:31 +02:00
parent e2f93a2829
commit 200e0d1f07

View file

@ -1550,8 +1550,8 @@ QHash<QByteArray, QVariant> KFileItemModel::retrieveData(const KFileItem& item,
data.insert(sharedValue("isLink"), true); data.insert(sharedValue("isLink"), true);
} }
if (m_requestRole[IsHiddenRole] && item.isHidden()) { if (m_requestRole[IsHiddenRole]) {
data.insert(sharedValue("isHidden"), true); data.insert(sharedValue("isHidden"), item.isHidden());
} }
if (m_requestRole[NameRole]) { if (m_requestRole[NameRole]) {