fix(add-wifi): Dialog is incorrect when choose wpa-wifi after chosen wep-wifi.
Description: 修复点击加入个人wifi后点击企业Wifi弹窗有误的问题 Log: 修复点击加入个人wifi后点击企业Wifi弹窗有误的问题 Bug: -
This commit is contained in:
parent
acb46b754d
commit
ab26f1eb92
|
@ -413,7 +413,7 @@ void WpaWifiDialog::activateConnection() {
|
|||
qDebug() << "qDebug: 连接超时(12秒超时时间)";
|
||||
});
|
||||
//设置超时时间
|
||||
timeout->start(12 * 1000);
|
||||
timeout->start(20 * 1000);
|
||||
});
|
||||
connect(upThread, &UpConnThread::connRes, this, [ = ](int res) {
|
||||
qDebug()<<"qDebug: Connect result is: "<<res;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "kylinheadfile.h"
|
||||
#include "src/backthread.h"
|
||||
#include "src/mainwindow.h"
|
||||
#include "src/wpawifidialog.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -161,8 +162,31 @@ void DlgHideWifiWpa::changeDialog()
|
|||
} else if(ui->cbxSecurity->currentIndex()==2) {
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
this->hide();
|
||||
DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(1, 0, mw);
|
||||
connHidWifiEapPeap->show();
|
||||
WpaWifiDialog * wpadlg = new WpaWifiDialog(mw, "");
|
||||
QPoint pos = QCursor::pos();
|
||||
QRect primaryGeometry;
|
||||
for (QScreen *screen : qApp->screens()) {
|
||||
if (screen->geometry().contains(pos)) {
|
||||
primaryGeometry = screen->geometry();
|
||||
}
|
||||
}
|
||||
if (primaryGeometry.isEmpty()) {
|
||||
primaryGeometry = qApp->primaryScreen()->geometry();
|
||||
}
|
||||
wpadlg->move(primaryGeometry.width() / 2 - wpadlg->width() / 2, primaryGeometry.height() / 2 - wpadlg->height() / 2);
|
||||
wpadlg->show();
|
||||
connect(wpadlg, &WpaWifiDialog::conn_done, this, [ = ]() {
|
||||
QString txt(tr("Conn Wifi Success"));
|
||||
mw->objKyDBus->showDesktopNotify(txt);
|
||||
mw->on_btnWifiList_clicked();
|
||||
});
|
||||
connect(wpadlg, &WpaWifiDialog::conn_failed, this, [ = ]() {
|
||||
QString txt(tr("Confirm your Wi-Fi password or usable of wireless card"));
|
||||
mw->objKyDBus->showDesktopNotify(txt);
|
||||
mw->on_btnWifiList_clicked();
|
||||
});
|
||||
// DlgHideWifiEapPeap *connHidWifiEapPeap = new DlgHideWifiEapPeap(1, 0, mw);
|
||||
// connHidWifiEapPeap->show();
|
||||
} else if(ui->cbxSecurity->currentIndex()==3) {
|
||||
QApplication::setQuitOnLastWindowClosed(false);
|
||||
this->hide();
|
||||
|
|
Loading…
Reference in New Issue