<table><tr><td style="">meven created this revision.<br />meven added reviewers: Frameworks, ngraham.<br />Herald added a project: Frameworks.<br />Herald added a subscriber: kde-frameworks-devel.<br />meven requested review of this revision.
</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/D25420">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When _k_slotViewKeyEnterReturnPressed is called, KDirOperator::_k_slotActivated is called first potentially opening another directory.<br />
And since the directory changed, the kdiroperator selection is empty, causing then kiowidgets-kdirmodeltest to call slotOk and if a filename was present in the filename field, it will cause the dialog to accept() prematurely.</p>
<p>This patch prevents _k_slotViewKeyEnterReturnPressed to call slotOk when it is called subsequently after the kdiroperator emitted urlEntered.</p>
<p>The patch also allows directories to be selected using Enter when the KDirOperator has no selection.</p>
<p>BUG: 412737<br />
FIXED-IN: 5.65</p>
<p>Relates to <a href="https://phabricator.kde.org/D19824" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: line-through;">D19824</a></p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Save a file using KFileWidget</li>
<li class="remarkup-list-item">Go to a folder with files and directories</li>
<li class="remarkup-list-item">Select a file</li>
<li class="remarkup-list-item">Select a directory</li>
<li class="remarkup-list-item">Hit Enter</li>
</ol>
<p>Before:<br />
The directory is opened briefly and the dialog returns.</p>
<p>After:<br />
The selected directory is opened.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D25420">https://phabricator.kde.org/D25420</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/filewidgets/kfilewidget.cpp</div></div></div><br /><div><strong>To: </strong>meven, Frameworks, ngraham<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>