Home GnuPG

qt: Cancel timeout on more user interactions

Description

qt: Cancel timeout on more user interactions

* qt/pinentrydialog.h, qt/pinentrydialog.cpp
(PinentryDialog::cancelTimeout): New.
* qt/pinentrydialog.cpp (PinEntryDialog::onBackspace): Cancel timeout.
(PinEntryDialog::updateQuality, PinEntryDialog::textChanged): Cancel
timeout in PinEntryDialog::textChanged instead of
PinEntryDialog::updateQuality.
(PinEntryDialog::onAccept): Cancel timeout.

Additionally to canceling the timeout when the user enters something
into the passphrase input field we also cancel the timeout when the
user presses Backspace (to disable passphrase echoing) or when the
user clicks Ok. In particular, this prevents the pinentry dialog from
being closed while the message that empty passphrases are not allowed
is shown.