[Places Item Edit Dialog] Fix accepting dialog with Return

Review Request #129213 - Created Oct. 18, 2016 and submitted

Information
Kai Uwe Broulik
dolphin
Applications/16.08
Reviewers
dolphin

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.

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Emmanuel Pescosta
Kai Uwe Broulik
Review request changed

Status: Closed (submitted)

Change Summary:

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