diff options
author | 2022-06-27 13:14:14 +0200 | |
---|---|---|
committer | 2022-06-27 16:44:14 +0530 | |
commit | 79b2b7915a7be4962c4b67db5bf87a36a782dbd4 (patch) | |
tree | a17a81e478a7889bd5c080a2eb8a9c12247b2919 | |
parent | ced5547de36d88f071f086258e32d21cdcda1e0d (diff) | |
download | whatsie-79b2b7915a7be4962c4b67db5bf87a36a782dbd4.tar.gz whatsie-79b2b7915a7be4962c4b67db5bf87a36a782dbd4.zip |
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
-rw-r--r-- | src/i18n/it_IT.ts | 2 | ||||
-rw-r--r-- | src/lock.cpp | 6 | ||||
-rw-r--r-- | src/lock.ui | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/i18n/it_IT.ts b/src/i18n/it_IT.ts index f419862..c08fd31 100644 --- a/src/i18n/it_IT.ts +++ b/src/i18n/it_IT.ts @@ -251,7 +251,7 @@ Desideri ignorare il controllo di sicurezza e continuare?</translation> </message> <message> <location filename="../lock.ui" line="311"/> - <source><html><head/><body><p>Note: Passcode must be more then 4 characters and must match in both fields.</p></body></html></source> + <source><html><head/><body><p>Note: Passcode must be more then 3 characters and must match in both fields.</p></body></html></source> <translation><html><head/><body><p>Nota: Il codice di blocco deve contenere più di 4 caratteri e deve corrispondere in entrambi i campi.</p></body></html></translation> </message> <message> 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() { diff --git a/src/lock.ui b/src/lock.ui index ffe0da0..264bb7d 100644 --- a/src/lock.ui +++ b/src/lock.ui @@ -308,7 +308,7 @@ <item> <widget class="QLabel" name="signup_warning"> <property name="text"> - <string><html><head/><body><p>Note: Passcode must be more then 4 characters and must match in both fields.</p></body></html></string> + <string><html><head/><body><p>Note: Passcode must be more then 3 characters and must match in both fields.</p></body></html></string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> |