From 79b2b7915a7be4962c4b67db5bf87a36a782dbd4 Mon Sep 17 00:00:00 2001 From: Gianluca Boiano <491117+M0Rf30@users.noreply.github.com> Date: Mon, 27 Jun 2022 13:14:14 +0200 Subject: chore: set a minimum of 4 digits for the lock code (#56) * chore: set a minimum of 4 digits for the lock code coming from other applications (i.e. telegram) we expect a 4 digit PIN as minimum requirement * chore: set ui messages on pass code lenght accordingly --- src/lock.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lock.cpp') diff --git a/src/lock.cpp b/src/lock.cpp index 6b86f68..3c47fb2 100644 --- a/src/lock.cpp +++ b/src/lock.cpp @@ -141,14 +141,14 @@ void Lock::on_passcode1_textChanged(const QString &arg1) { if (arg1.contains(" ")) { ui->passcode1->setText(arg1.simplified()); } - ui->setPass->setEnabled(arg1.length() > 4 && arg1 == ui->passcode2->text()); + ui->setPass->setEnabled(arg1.length() > 3 && arg1 == ui->passcode2->text()); } void Lock::on_passcode2_textChanged(const QString &arg1) { if (arg1.contains(" ")) { ui->passcode2->setText(arg1.simplified()); } - ui->setPass->setEnabled(arg1.length() > 4 && arg1 == ui->passcode1->text()); + ui->setPass->setEnabled(arg1.length() > 3 && arg1 == ui->passcode1->text()); } void Lock::on_setPass_clicked() { @@ -188,7 +188,7 @@ void Lock::on_passcodeLogin_textChanged(const QString &arg1) { ui->passcodeLogin->setText(arg1.simplified()); } ui->wrong->hide(); - ui->unlock->setEnabled(arg1.length() > 4); + ui->unlock->setEnabled(arg1.length() > 3); } void Lock::lock_app() { -- cgit v1.2.3