Set input method hints in typed input fields

Phone, e-mail, URL, username, code, date and amount fields now tell the
input method what they are for, so it can pick a suitable layout and skip
predictive text where it only gets in the way. One-time codes and secrets
are additionally marked with Qt::ImhSensitiveData.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilya Fedin
2026-08-12 12:11:34 +04:00
committed by John Preston
parent 998c2456d8
commit 6989eeb1be
21 changed files with 111 additions and 1 deletions

View File

@@ -311,6 +311,9 @@ void PasscodeBox::prepare() {
) | rpl::on_next([=] {
newChanged();
}, _passwordHint->lifetime());
_recoverEmail->setInputMethodHints(Qt::ImhEmailCharactersOnly
| Qt::ImhNoAutoUppercase
| Qt::ImhNoPredictiveText);
_recoverEmail->changes(
) | rpl::on_next([=] {
if (!_emailError.isEmpty()) {