diff --git a/debian/changelog b/debian/changelog index 4026f893..1a1ac688 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +kylin-nm (3.0.1-1kylin52) v101; urgency=medium + + * BUG号:#58755 #61924 #61509 #61783 + * 需求号:无 + * 其他改动:无 + + -- zhangjiaping Tue, 22 Jun 2021 15:17:42 +0800 + kylin-nm (3.0.1-1kylin51) v101; urgency=medium * BUG号:无 diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7a98e83c..075a1344 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1055,7 +1055,10 @@ void MainWindow::getActiveInfoAndSetTrayIcon() else { setTrayLoading(true); } - + if (actWifiName != "--" && activeWifiSignalLv != 0) { + setTrayIconOfWifi(activeWifiSignalLv); + emit this->actWifiSignalLvChanaged(activeWifiSignalLv); + } } else if (actWifiName != "--" && activeWifiSignalLv != 0) { setTrayIconOfWifi(activeWifiSignalLv); emit this->actWifiSignalLvChanaged(activeWifiSignalLv); @@ -2833,10 +2836,10 @@ void MainWindow::loadWifiListDone(QStringList slist) //ccf->setRate(wrate); int signal; - if (wsignal.toInt() != 0) + if (wsignal.toInt() == 0) signal = ccf->getSignal(); else - signal = wsignal.toInt() + 11; + signal = wsignal.toInt(); ccf->setSignal(QString::number(signal), wsecu, wcate); setTrayIconOfWifi(wsignal.toInt()); activeWifiSignalLv = wsignal.toInt(); diff --git a/src/oneconnform.cpp b/src/oneconnform.cpp index a8b82acc..d5a730b1 100644 --- a/src/oneconnform.cpp +++ b/src/oneconnform.cpp @@ -990,17 +990,22 @@ void OneConnForm::setlbPwdTipVisble(const bool &visible) } //设置密码隐藏或可见 -void OneConnForm::on_checkBoxPwd_pressed() +void OneConnForm::on_checkBoxPwd_clicked() { - ui->checkBoxPwd->setChecked(true); - ui->lePassword->setEchoMode(QLineEdit::Normal); + if (ui->lePassword->echoMode() == QLineEdit::Password) { + ui->checkBoxPwd->setChecked(true); + ui->lePassword->setEchoMode(QLineEdit::Normal); + } else { + ui->checkBoxPwd->setChecked(false); + ui->lePassword->setEchoMode(QLineEdit::Password); + } } -void OneConnForm::on_checkBoxPwd_released() -{ - ui->checkBoxPwd->setChecked(false); - ui->lePassword->setEchoMode(QLineEdit::Password); -} +//void OneConnForm::on_checkBoxPwd_released() +//{ +// ui->checkBoxPwd->setChecked(false); +// ui->lePassword->setEchoMode(QLineEdit::Password); +//} void OneConnForm::on_lePassword_textEdited(const QString &arg1) { diff --git a/src/oneconnform.h b/src/oneconnform.h index 047b3c3d..91612123 100644 --- a/src/oneconnform.h +++ b/src/oneconnform.h @@ -137,9 +137,7 @@ private slots: void on_btnCancel_clicked(); - void on_checkBoxPwd_pressed(); - - void on_checkBoxPwd_released(); + void on_checkBoxPwd_clicked(); bool onMenuTriggered(QAction *); diff --git a/src/onelancform.cpp b/src/onelancform.cpp index e9943e8a..5ce133be 100644 --- a/src/onelancform.cpp +++ b/src/onelancform.cpp @@ -289,12 +289,14 @@ void OneLancForm::setIcon(bool isOn) if (isOn) { if (!QIcon::fromTheme("network-wired-connected-symbolic").isNull()) { ui->lbIcon->setPixmap(QIcon::fromTheme("network-wired-connected-symbolic").pixmap(32,32)); + ui->lbIcon->setProperty("useIconHighlightEffect", 0x10); } else { ui->lbIcon->setPixmap(QIcon(":/res/l/network-online.png").pixmap(32,32)); } } else { if (!QIcon::fromTheme("network-wired-disconnected-symbolic").isNull()) { ui->lbIcon->setPixmap(QIcon::fromTheme("network-wired-disconnected-symbolic").pixmap(32,32)); + ui->lbIcon->setProperty("useIconHighlightEffect", 0x10); } else { ui->lbIcon->setPixmap(QIcon(":/res/l/network-offline.png").pixmap(32,32)); } diff --git a/src/wificonfigdialog.cpp b/src/wificonfigdialog.cpp index a3b3d00b..23d2d24e 100644 --- a/src/wificonfigdialog.cpp +++ b/src/wificonfigdialog.cpp @@ -145,17 +145,22 @@ void WiFiConfigDialog::toConfigWifi() } //切换密码明文 -void WiFiConfigDialog::on_checkBoxPwd_pressed() +void WiFiConfigDialog::on_checkBoxPwd_clicked() { - ui->checkBoxPwd->setChecked(true); - ui->leWifiPassword->setEchoMode(QLineEdit::Normal); + if (ui->leWifiPassword->echoMode() == QLineEdit::Password) { + ui->checkBoxPwd->setChecked(true); + ui->leWifiPassword->setEchoMode(QLineEdit::Normal); + } else { + ui->checkBoxPwd->setChecked(false); + ui->leWifiPassword->setEchoMode(QLineEdit::Password); + } } -void WiFiConfigDialog::on_checkBoxPwd_released() -{ - ui->checkBoxPwd->setChecked(false); - ui->leWifiPassword ->setEchoMode(QLineEdit::Password); -} +//void WiFiConfigDialog::on_checkBoxPwd_released() +//{ +// ui->checkBoxPwd->setChecked(false); +// ui->leWifiPassword ->setEchoMode(QLineEdit::Password); +//} void WiFiConfigDialog::on_leWifiId_textEdited(const QString &arg1) { diff --git a/src/wificonfigdialog.h b/src/wificonfigdialog.h index 87275d2d..90588783 100644 --- a/src/wificonfigdialog.h +++ b/src/wificonfigdialog.h @@ -37,9 +37,9 @@ private slots: void on_leWifiPassword_textEdited(const QString &arg1); - void on_checkBoxPwd_pressed(); + void on_checkBoxPwd_clicked(); - void on_checkBoxPwd_released(); +// void on_checkBoxPwd_released(); private: Ui::WiFiConfigDialog *ui; diff --git a/src/wpawifidialog.cpp b/src/wpawifidialog.cpp index fa8aa909..0c479a6d 100644 --- a/src/wpawifidialog.cpp +++ b/src/wpawifidialog.cpp @@ -513,16 +513,22 @@ void WpaWifiDialog::initConnect() { //连接按钮 connect(connectBtn, &QPushButton::clicked, this, &WpaWifiDialog::slot_on_connectBtn_clicked); //显示密码 - connect(pwdShowBtn, &QCheckBox::pressed, this, [ = ]() { - pwdShowBtn->setChecked(true); - pwdEditor->setEchoMode(QLineEdit::Normal); - m_pwd4PrivateKeyPWDEditor->setEchoMode(QLineEdit::Normal); - }); - connect(pwdShowBtn, &QCheckBox::released, this, [ = ]() { - pwdShowBtn->setChecked(false); - pwdEditor->setEchoMode(QLineEdit::Password); - m_pwd4PrivateKeyPWDEditor->setEchoMode(QLineEdit::Password); + connect(pwdShowBtn, &QCheckBox::clicked, this, [ = ]() { + if (pwdEditor->echoMode() == QLineEdit::Password) { + pwdShowBtn->setChecked(true); + pwdEditor->setEchoMode(QLineEdit::Normal); + m_pwd4PrivateKeyPWDEditor->setEchoMode(QLineEdit::Normal); + } else { + pwdShowBtn->setChecked(false); + pwdEditor->setEchoMode(QLineEdit::Password); + m_pwd4PrivateKeyPWDEditor->setEchoMode(QLineEdit::Password); + } }); +// connect(pwdShowBtn, &QCheckBox::released, this, [ = ]() { +// pwdShowBtn->setChecked(false); +// pwdEditor->setEchoMode(QLineEdit::Password); +// m_pwd4PrivateKeyPWDEditor->setEchoMode(QLineEdit::Password); +// }); 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); @@ -695,6 +701,10 @@ void WpaWifiDialog::setEditorEnable(bool is_checking) { } void WpaWifiDialog::activateConnection() { + if (this->mw->is_stop_check_net_state == 1) { +// conn_failed(); + return; + } UpConnThread * upThread = new UpConnThread(userEditor->text(), pwdEditor->text()); upThread->conn_name = nameEditor->text(); //超时计时器 @@ -708,8 +718,8 @@ void WpaWifiDialog::activateConnection() { timeout->deleteLater(); QString cmdStr_2 = "nmcli connection down '" + nameEditor->text() + "'"; Utils::m_system(cmdStr_2.toUtf8().data()); - //this->mw->is_stop_check_net_state = 0; - //this->mw->setTrayLoading(false); + this->mw->is_stop_check_net_state = 0; + this->mw->setTrayLoading(false); qDebug() << "qDebug: activate time out in function activateConnection"; qDebug() << "qDebug: 连接超时(30秒超时时间)"; }); @@ -722,8 +732,8 @@ void WpaWifiDialog::activateConnection() { //连接错误或连接超时 setEditorEnable(true); emit conn_failed(); - //this->mw->is_stop_check_net_state = 0; - //this->mw->setTrayLoading(false); + this->mw->is_stop_check_net_state = 0; + this->mw->setTrayLoading(false); } else { //连接成功 timeout->stop(); @@ -732,13 +742,15 @@ void WpaWifiDialog::activateConnection() { upThread->wait(); upThread->deleteLater(); emit conn_done(); - //this->mw->is_stop_check_net_state = 0; - //this->mw->setTrayLoading(false); + this->mw->is_stop_check_net_state = 0; + this->mw->setTrayLoading(false); qDebug() << "qDebug: activated wpa security wifi successfully"; this->close(); } }); upThread->start(); + this->mw->is_stop_check_net_state = 1; + this->mw->setTrayLoading(true); } QStringList WpaWifiDialog::getWifiInfo(QString wifiName) { diff --git a/wireless-security/dlghidewifiwpa.cpp b/wireless-security/dlghidewifiwpa.cpp index a6927689..7fe86a2d 100644 --- a/wireless-security/dlghidewifiwpa.cpp +++ b/wireless-security/dlghidewifiwpa.cpp @@ -340,17 +340,22 @@ void DlgHideWifiWpa::on_btnConnect_clicked() //} //切换密码明文 -void DlgHideWifiWpa::on_checkBoxPwd_pressed() +void DlgHideWifiWpa::on_checkBoxPwd_clicked() { - ui->checkBoxPwd->setChecked(true); - ui->lePassword->setEchoMode(QLineEdit::Normal); + if (ui->lePassword->echoMode() == QLineEdit::Password) { + ui->checkBoxPwd->setChecked(true); + ui->lePassword->setEchoMode(QLineEdit::Normal); + } else { + ui->checkBoxPwd->setChecked(false); + ui->lePassword->setEchoMode(QLineEdit::Password); + } } -void DlgHideWifiWpa::on_checkBoxPwd_released() -{ - ui->checkBoxPwd->setChecked(false); - ui->lePassword->setEchoMode(QLineEdit::Password); -} +//void DlgHideWifiWpa::on_checkBoxPwd_released() +//{ +// ui->checkBoxPwd->setChecked(false); +// ui->lePassword->setEchoMode(QLineEdit::Password); +//} void DlgHideWifiWpa::on_leNetName_textEdited(const QString &arg1) { diff --git a/wireless-security/dlghidewifiwpa.h b/wireless-security/dlghidewifiwpa.h index 0e599fa2..28e83489 100644 --- a/wireless-security/dlghidewifiwpa.h +++ b/wireless-security/dlghidewifiwpa.h @@ -60,9 +60,9 @@ private slots: // void finishedProcess(int res); - void on_checkBoxPwd_pressed(); + void on_checkBoxPwd_clicked(); - void on_checkBoxPwd_released(); +// void on_checkBoxPwd_released(); signals: void reSetWifiList();