[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Review Request 114459: Update filtered items when the "refreshItems" signal is received
From: "Frank Reininghaus" <frank78ac () googlemail ! com>
Date: 2013-12-14 18:20:57
Message-ID: 20131214182057.14113.47848 () vidsolbach ! de
[Download RAW message or body]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114459/
-----------------------------------------------------------
Review request for Dolphin.
Repository: kde-baseapps
Description
-------
KDirLister tells us about changed files via its "refreshItems" signal. We do update \
the files in the view in KFileItemModel::slotRefreshItems(), but we do not check if \
filtered items might need to be updated as well.
To see this:
1. In an empty directory, create two test files with "touch a.txt b.jpg"
2. Open the directory in Dolphin, and split the view.
3. In one of the views, press Ctrl+I and enter the filter text "txt" -> b.jpg \
disappears. 4. In the other view, rename "b.jpg" to "c.jpg".
5. Clear the filter -> the view still shows a.txt and b.jpg.
Diffs
-----
dolphin/src/kitemviews/kfileitemmodel.cpp 739384b
dolphin/src/tests/kfileitemmodeltest.cpp ede9a3d
Diff: http://git.reviewboard.kde.org/r/114459/diff/
Testing
-------
The patch fixes the problem for me. Old and new unit tests pass.
Note that there is still another problem left: if the renamed filtered file matches \
the filter, it should be shown in the view, and if a file does not match the filter \
any more after renaming it, it should be filtered.
Thanks,
Frank Reininghaus
[Attachment #3 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/114459/">http://git.reviewboard.kde.org/r/114459/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Dolphin.</div>
<div>By Frank Reininghaus.</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-baseapps
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">KDirLister tells us about changed files via its "refreshItems" \
signal. We do update the files in the view in KFileItemModel::slotRefreshItems(), but \
we do not check if filtered items might need to be updated as well.
To see this:
1. In an empty directory, create two test files with "touch a.txt b.jpg"
2. Open the directory in Dolphin, and split the view.
3. In one of the views, press Ctrl+I and enter the filter text "txt" -> \
b.jpg disappears. 4. In the other view, rename "b.jpg" to \
"c.jpg". 5. Clear the filter -> the view still shows a.txt and \
b.jpg.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">The patch fixes the problem for me. Old and new unit tests pass.
Note that there is still another problem left: if the renamed filtered file matches \
the filter, it should be shown in the view, and if a file does not match the filter \
any more after renaming it, it should be filtered.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>dolphin/src/kitemviews/kfileitemmodel.cpp <span style="color: \
grey">(739384b)</span></li>
<li>dolphin/src/tests/kfileitemmodeltest.cpp <span style="color: \
grey">(ede9a3d)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/114459/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic