Review Request 110401: Do not reset the 'isExpanded' state of folders when the 'refreshItems' signal is received.

Frank Reininghaus frank78ac at googlemail.com
Sun May 12 08:53:14 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110401/
-----------------------------------------------------------

Review request for Dolphin.


Description
-------

When the refreshItems signal is received for an item, we call KFileItemModel::retrieveData(), which updates many of the item's properties. Unfortunately, it also resets the 'isExpanded' state to false. The result is that folders are (partly) collapsed in the view when their contents change.

I propose to fix this by not initializing the 'isExpanded' role at all in retrieveData(). When KFileItemModel::isExpanded() tries to access the non-existing entry in the hash, the default-constructed QVariant evaluates to 'false' anyway.


This addresses bug 299675.
    http://bugs.kde.org/show_bug.cgi?id=299675


Diffs
-----

  dolphin/src/kitemviews/kfileitemmodel.cpp 7ba78a4 
  dolphin/src/tests/kfileitemmodeltest.cpp 58e83ac 

Diff: http://git.reviewboard.kde.org/r/110401/diff/


Testing
-------

Works for me, old and new unit tests pass.


Thanks,

Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130512/5b6cde1a/attachment.htm>


More information about the kfm-devel mailing list