[Places Item Edit Dialog] Fix accepting dialog with Return
Review Request #129213 - Created Oct. 18, 2016 and submitted
|Kai Uwe Broulik|
By setting a parent for the QDialogButtonBox we let QDialog handle everything by itself. Also, store the dialog button box as a member rather than just the OK button.
This removes the need to set the OK button as default manually (which didn't work anyway) and fixes pressing Return while the input is focused erroneously opening the folder browser rather than accepting the dialog.
Right clicked a place, chose "Edit". Inspired by upstream KFilePlacesEditDialog in KIO.
The "OK" button is now properly highlighted as default button (it's slightly lighter than the Cancel button).
Pressing Return while the URL input is focused now accepts the dialog rather than opening the "Choose folder" dialog. Pressing Return while another button is focused (be it the browse or icon button) still triggers the button as expected.
Pressing Escape dismisses the dialog without saving.
Clearing the URL field disables the OK button as expected.