meven created this revision. meven added reviewers: Frameworks, ngraham. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. meven requested review of this revision.
REVISION SUMMARY When _k_slotViewKeyEnterReturnPressed is called, KDirOperator::_k_slotActivated is called first potentially opening another directory. 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. This patch prevents _k_slotViewKeyEnterReturnPressed to call slotOk when it is called subsequently after the kdiroperator emitted urlEntered. The patch also allows directories to be selected using Enter when the KDirOperator has no selection. BUG: 412737 FIXED-IN: 5.65 Relates to D19824 <https://phabricator.kde.org/D19824> TEST PLAN 1. Save a file using KFileWidget 2. Go to a folder with files and directories 3. Select a file 4. Select a directory 5. Hit Enter Before: The directory is opened briefly and the dialog returns. After: The selected directory is opened. REPOSITORY R241 KIO BRANCH master REVISION DETAIL https://phabricator.kde.org/D25420 AFFECTED FILES src/filewidgets/kfilewidget.cpp To: meven, #frameworks, ngraham Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns