Merge pull request #102 from crrs666/master

restrict password of hidden wpa wifi to be at least 6 digits fix43616
This commit is contained in:
chenlelin 2021-03-26 20:03:56 +08:00 committed by GitHub
commit 1099e27ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -210,6 +210,7 @@ void WpaWifiDialog::initUI() {
pwdShowLabel = new QLabel(pwdShowFrame);
pwdShowLabel->setFixedWidth(120);
pwdShowBtn->setFixedSize(16, 16);
pwdShowBtn->setStyleSheet("background-color:rgb(61,61,65);");
pwdShowLabel->setText(tr("Show password"));
pwdShowLyt->addWidget(pwdShowBtn);
pwdShowLyt->addWidget(pwdShowLabel);
@ -220,6 +221,7 @@ void WpaWifiDialog::initUI() {
askPwdLyt = new QHBoxLayout(askPwdFrame);
askPwdLyt->setContentsMargins(130, 0, 0, 0);
askPwdBtn = new QCheckBox(askPwdFrame);
askPwdBtn->setStyleSheet("background-color:rgb(61,61,65);");
askPwdlabel = new QLabel(askPwdFrame);
// askPwdlabel->setFixedWidth(120);
askPwdBtn->setFixedSize(16, 16);

View File

@ -352,7 +352,7 @@ void DlgHideWifiWpa::on_checkBoxPwd_stateChanged(int arg1)
void DlgHideWifiWpa::on_leNetName_textEdited(const QString &arg1)
{
if (ui->leNetName->text() == "" || ui->lePassword->text() == ""){
if (ui->leNetName->text() == "" || ui->lePassword->text().size() < 6){
ui->btnConnect->setEnabled(false);
} else {
ui->btnConnect->setEnabled(true);
@ -366,7 +366,7 @@ void DlgHideWifiWpa::on_leNetName_textEdited(const QString &arg1)
void DlgHideWifiWpa::on_lePassword_textEdited(const QString &arg1)
{
if (ui->leNetName->text() == "" || ui->lePassword->text() == ""){
if (ui->leNetName->text() == "" || ui->lePassword->text().size() < 6){
ui->btnConnect->setEnabled(false);
} else {
ui->btnConnect->setEnabled(true);

View File

@ -88,8 +88,8 @@
<widget class="QCheckBox" name="checkBoxPwd">
<property name="geometry">
<rect>
<x>332</x>
<y>272</y>
<x>370</x>
<y>270</y>
<width>18</width>
<height>9</height>
</rect>