[KFileWidget] Avoid calling slotOk right after the url changed
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 KDirOperator::keyEnterReturnPressed to be emitted when QAbstractItemView::activated would be, preventing the issue in the first place. BUG: 412737 FIXED-IN: 5.65 Relates to 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. Reviewers: #frameworks, ngraham, elvisangelaccio, dfaure Reviewed By: ngraham, dfaure Subscribers: ahmadsamir, feverfew, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D25420
parent
a5830fa9
Please register or sign in to comment