Review Request 129213: [Places Item Edit Dialog] Fix accepting dialog with Return

Kai Uwe Broulik kde at privat.broulik.de
Tue Oct 18 14:38:25 BST 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129213/
-----------------------------------------------------------

Review request for Dolphin.


Repository: dolphin


Description
-------

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.


Diffs
-----

  src/panels/places/placesitemeditdialog.h 8a0dc04 
  src/panels/places/placesitemeditdialog.cpp 7d36531 

Diff: https://git.reviewboard.kde.org/r/129213/diff/


Testing
-------

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.


Thanks,

Kai Uwe Broulik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20161018/3d69c8c6/attachment.htm>


More information about the kfm-devel mailing list