<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/112756/">http://git.reviewboard.kde.org/r/112756/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
<br />
<p>- Stephen</p>
<br />
<p>On September 16th, 2013, 1:56 p.m. UTC, Aurélien Gâteau wrote:</p>
<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 kdelibs and Stephen Kelly.</div>
<div>By Aurélien Gâteau.</div>
<p style="color: grey;"><i>Updated Sept. 16, 2013, 1:56 p.m.</i></p>
<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;">I noticed Gwenview keyboard navigation broke with the latest KLinkItemSelectionModel changes: in browse mode, in a folder which contains both folders and images, something like this:
dir1 dir2 img1 img2
if img1 is selected, pressing the left arrow makes dir1 selected instead of dir2.
This can be explain as so: given the following
model A with content:
0. dir1
1. dir2
2. img1
3. img2
model B a proxy model on A with content:
0. img1
1. img2
AView and BView, views on each models and a KLinkItemSelectionModel to link selections between AView and BView.
Setting current index in AView to row 1, which does not exist in BView, currently causes KLinkItemSelectionModel to set BView current index to invalid, which in turns cause KLinkItemSelectionModel to set AView current index to invalid.
Patch in this request prevents invalid indexes from being propagated. I am not sure it is the best behavior though: maybe we don't want to propagate invalid indexes, unless the original index is invalid itself? If I set current index of AView to invalid, maybe BView current index should become invalid as well? I am happy to implement this alternate behavior if you think it's better.</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;">Existing test case has been extended to test behavior in case of invalid indexes. Gwenview keyboard behavior is not broken anymore.</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>kdeui/itemviews/klinkitemselectionmodel.cpp <span style="color: grey">(be8395f)</span></li>
<li>kdeui/tests/klinkitemselectionmodeltest.cpp <span style="color: grey">(91540fd)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/112756/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>