Make all buttons in the main window activatable with enter

Authored by davidre on Oct 9 2019, 9:08 AM.

Description

Make all buttons in the main window activatable with enter

Summary:
In a QDialog QPushbuttons will have autoDefault==true and the Dialog will call
setDefault(true) on them. This allows the user to activate the Buttons with the
enter key. However we also use QToolButtons in the main window with no visible
difference to the user. This caused unexpected activations of the help button
(the first default button) when a tool button was focused. In a custom event
handler we can check if the current focused widget is tool or push button when
the enter key is pressed and activate them accordingly.

BUG: 412184
FIXED-IN: 19.08.3

Reviewers: Spectacle, ngraham

Reviewed By: Spectacle, ngraham

Subscribers: ngraham, aprcela, Spectacle

Tags: Spectacle

Differential Revision: https://phabricator.kde.org/D24508

Details

Committed
davidreOct 10 2019, 10:17 AM
Reviewer
Spectacle
Differential Revision
D24508: Make all buttons in the main window activatable with enter
Parents
R166:93bfdb2eb69a: GIT_SILENT Upgrade KDE Applications version to 19.08.2.
Branches
Unknown
Tags
Unknown