D7015: fix double search dialog trigger caused by excess manual slot connection
noreply at phabricator.kde.org
Mon Jul 31 09:15:55 UTC 2017
sitter created this revision.
Restricted Application added a subscriber: kde-utils-devel.
QPushButtons have a defaultyness which causes the "default" to get a click
signal if return gets pressed. Combined with the manual connection from
QLineEdit this causes a double trigger of slotSearch resulting
in the search dialog popping up, after closing popping up again (second
Given the defaultyness of QPB the manual connection from the QLE to the
search slot is not necessary as hitting return will trigger the search
anyway due to auto-defaultyness.
To make the defaultyness more assertive in the code we'll set the search
button as manual default (gets triggered whenever no auto-default button
has focus). Additionally, the manual connection from QLE to the search slot
gets dropped as it is unnecessary.
This prevents the dialog from opening twice *and* has the side effect of
making the dialog properly keyboard accessible. Previously if you entered
a keyid and tabbed your way to the import button the import would run, BUT
so would a search (due to the connection). Using defaultyness we'll now
run search unless the user explicitly gave import focus (e.g. by tabbing to
CHANGELOG: fix duplicated dialog when searching for keys
To: sitter, dakon
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kde-utils-devel