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

Commit Hook null at kde.org
Wed May 22 17:19:14 BST 2013


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

(Updated May 22, 2013, 4:19 p.m.)


Status
------

This change has been marked as submitted.


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/20130522/416f2c1e/attachment.htm>


More information about the kfm-devel mailing list