From kfm-devel Thu Sep 26 21:09:09 2013 From: "Frank Reininghaus" Date: Thu, 26 Sep 2013 21:09:09 +0000 To: kfm-devel Subject: Review Request 112962: Make sure that KFileItemModel::removeExpandedItems() also expands filtered it Message-Id: <20130926210909.10539.94834 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kfm-devel&m=138022976219720 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============5126068872668864882==" --===============5126068872668864882== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/112962/ ----------------------------------------------------------- Review request for Dolphin. Description ------- I just noticed that KFileItemModel::removeExpandedItems() fails to remove expanded items that are currently filtered, which can make expanded items re-appear incorrectly after switching from Details to Icons View. The fix is quite straightforward - just iterate over the filtered items and remove those which have a parent. This addresses bug 325344. http://bugs.kde.org/show_bug.cgi?id=325344 Diffs ----- dolphin/src/kitemviews/kfileitemmodel.cpp b6b6ee0 dolphin/src/tests/kfileitemmodeltest.cpp 391fe5b Diff: http://git.reviewboard.kde.org/r/112962/diff/ Testing ------- Fixes the bug for me. Old and new unit tests pass. Thanks, Frank Reininghaus --===============5126068872668864882== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit
This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/112962/

Review request for Dolphin.
By Frank Reininghaus.

Description

I just noticed that KFileItemModel::removeExpandedItems() fails to remove expanded items that are currently filtered, which can make expanded items re-appear incorrectly after switching from Details to Icons View.

The fix is quite straightforward - just iterate over the filtered items and remove those which have a parent.

Testing

Fixes the bug for me. Old and new unit tests pass.
Bugs: 325344

Diffs

  • dolphin/src/kitemviews/kfileitemmodel.cpp (b6b6ee0)
  • dolphin/src/tests/kfileitemmodeltest.cpp (391fe5b)

View Diff

--===============5126068872668864882==--