Merge branch '0621-dev' into 'main'

fix bugs

See merge request kylin-desktop/kylin-nm!49
This commit is contained in:
chen lelin 2021-06-23 02:26:39 +00:00
commit 74d4e56051
10 changed files with 87 additions and 49 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
kylin-nm (3.0.1-1kylin52) v101; urgency=medium
* BUG号#58755 #61924 #61509 #61783
* 需求号:无
* 其他改动:无
-- zhangjiaping <zhangjiaping@kylinos.cn> Tue, 22 Jun 2021 15:17:42 +0800
kylin-nm (3.0.1-1kylin51) v101; urgency=medium
* BUG号

View File

@ -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();

View File

@ -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)
{

View File

@ -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 *);

View File

@ -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));
}

View File

@ -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)
{

View File

@ -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;

View File

@ -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) {

View File

@ -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)
{

View File

@ -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();