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

Kai Uwe Broulik kde at privat.broulik.de
Fri Oct 28 12:41:37 BST 2016


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

(Updated Oct. 28, 2016, 1:41 p.m.)


Status
------

This change has been marked as submitted.


Review request for Dolphin.


Changes
-------

Submitted with commit 95e1505c9f01bdae2c1157be1bb6fa5b991c8fd4 by Kai Uwe Broulik to branch Applications/16.08.


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/20161028/ff6a70bc/attachment.htm>


More information about the kfm-devel mailing list