Review Request: Rename KFileItemModel::setExpanded() to KFileItemModel::expandParentItems(), fix and simplify the function

Frank Reininghaus frank78ac at googlemail.com
Sat Feb 4 13:14:52 GMT 2012


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

Review request for Dolphin.


Description
-------

This patch makes the following changes to the function KFileItemModel::setExpanded(const QSet<KUrl>& urls):

1. Rename to expandParentItems() and make sure that really only the parents are expanded. This fixes a bug in the Folders Panel: If a folder is activated which is not shown in the panel yet, not only its parents, but also the folder itself is expanded.

2. Change the argument from a set of URLs to a single URL. The Folders Panel only calls this function for single URLs anyway, and this permits to simplify the function.


Diffs
-----

  dolphin/src/kitemviews/kfileitemmodel.h ff816c8 
  dolphin/src/kitemviews/kfileitemmodel.cpp db9b711 
  dolphin/src/panels/folders/folderspanel.cpp 2511d7e 
  dolphin/src/tests/kfileitemmodeltest.cpp c3611ef 

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


Testing
-------

Works as expected for me. Unit test added (including a test for https://bugs.kde.org/show_bug.cgi?id=291781, which was about the Folders Panel failing to expand folders whose name contains special characters).


Thanks,

Frank Reininghaus

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


More information about the kfm-devel mailing list