<table><tr><td style="">jtamate updated this revision to Diff 47731.<br />jtamate marked an inline comment as done.<br />jtamate retitled this revision from "Unit test and fix for bug 401552" to "fix for bug 401552".<br />jtamate edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-bmrstcwkbbcljgd/">(Show Details)</a><br />jtamate edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-fbzsthoowuc6ov7/">(Show Details)</a><br />jtamate added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D17619">View Revision</a></tr></table><br /><div><div><p>There is no need for a unit test, it is already in kdirmodeltest (but perhaps could be expanded in another patch).</p>
<p>I've realized that it only modifies all paths of the subdirectories, and therefore if all the items of a sorted list change the same values, the order is preserved.</p></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Create a temporary list with</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">As only the items in subdirectories of</span> the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">modified items.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">renamed one are modified,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">After</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">if all the items are changed</span> the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">original list has been processed</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">same part of the path with the same new value</span>, the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">temporary list becomes the original list.<br />
i.e.</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">order is preserved,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Don't change the items in</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">therefore modify</span> the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">list while it is being processed</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">path directly in the list</span>.</div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;">Can't reproduce the bug.<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
Passes kdirmodeltest and kdirlistertest (and many others).<br />
</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D17619?vs=47666&id=47731">https://phabricator.kde.org/D17619?vs=47666&id=47731</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17619">https://phabricator.kde.org/D17619</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/kcoredirlister.cpp</div></div></div><br /><div><strong>To: </strong>jtamate, dfaure, Frameworks<br /><strong>Cc: </strong>elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, bruns<br /></div>