diff --git a/src/wpawifidialog.cpp b/src/wpawifidialog.cpp index 7c921f21..dd883119 100644 --- a/src/wpawifidialog.cpp +++ b/src/wpawifidialog.cpp @@ -411,6 +411,7 @@ void WpaWifiDialog::initConnect() { }); connect(pwdEditor, &QLineEdit::textChanged, this, &WpaWifiDialog::slot_line_edit_changed); connect(userEditor, &QLineEdit::textChanged, this, &WpaWifiDialog::slot_line_edit_changed); + connect(nameEditor, &QLineEdit::textChanged, this, &WpaWifiDialog::slot_line_edit_changed); } void WpaWifiDialog::slot_line_edit_changed() { @@ -419,6 +420,11 @@ void WpaWifiDialog::slot_line_edit_changed() { } else { connectBtn->setEnabled(false); } + + if (nameEditor->text().size() > 32) { + QString cutStr = nameEditor->text().mid(0,32); + nameEditor->setText(cutStr); + } } void WpaWifiDialog::slot_on_connectBtn_clicked() { diff --git a/wireless-security/dlghidewifi.cpp b/wireless-security/dlghidewifi.cpp index 2e552ae4..66bf07a6 100644 --- a/wireless-security/dlghidewifi.cpp +++ b/wireless-security/dlghidewifi.cpp @@ -337,6 +337,11 @@ void DlgHideWifi::on_leNetName_textEdited(const QString &arg1) } else { ui->btnConnect->setEnabled(true); } + + if (ui->leNetName->text().size() > 32) { + QString cutStr = ui->leNetName->text().mid(0,32); + ui->leNetName->setText(cutStr); + } } void DlgHideWifi::slotStartLoading() diff --git a/wireless-security/dlghidewifiwpa.cpp b/wireless-security/dlghidewifiwpa.cpp index 61e6e46b..3422da3c 100644 --- a/wireless-security/dlghidewifiwpa.cpp +++ b/wireless-security/dlghidewifiwpa.cpp @@ -400,6 +400,11 @@ void DlgHideWifiWpa::on_leNetName_textEdited(const QString &arg1) } else { ui->btnConnect->setEnabled(true); } + + if (ui->leNetName->text().size() > 32) { + QString cutStr = ui->leNetName->text().mid(0,32); + ui->leNetName->setText(cutStr); + } } void DlgHideWifiWpa::on_lePassword_textEdited(const QString &arg1)