diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp index 90cea688..6b0526c0 100644 --- a/src/frontend/list-items/wlanlistitem.cpp +++ b/src/frontend/list-items/wlanlistitem.cpp @@ -1,6 +1,7 @@ #include "wlanlistitem.h" #include -#include "enterprisewlandialog.h" +#include +#include #define EMPTY_SSID "EMPTY_SSID" #define LOG_FLAG "[WlanListItem]" @@ -405,11 +406,12 @@ void WlanListItem::onNetButtonClicked() if (!this->m_connectButton->isVisible() && m_wirelessNetItem.m_secuType != "") { if (m_wirelessNetItem.m_secuType.contains("802.1x", Qt::CaseInsensitive)) { - if (isEnterpriseWlanDialogShow) { + if (isEnterpriseWlanDialogShow && enterpriseWlanDialog != nullptr) { qDebug() << LOG_FLAG <<"EnterpriseWlanDialog is show do not show again!"; + KWindowSystem::raiseWindow(enterpriseWlanDialog->winId()); return; } else { - EnterpriseWlanDialog *enterpriseWlanDialog = new EnterpriseWlanDialog(m_wirelessNetItem, m_wlanDevice, this); + enterpriseWlanDialog = new EnterpriseWlanDialog(m_wirelessNetItem, m_wlanDevice, this); connect(enterpriseWlanDialog, &EnterpriseWlanDialog::enterpriseWlanDialogClose, this, &WlanListItem::onEnterpriseWlanDialogClose); enterpriseWlanDialog->show(); isEnterpriseWlanDialogShow = true; diff --git a/src/frontend/list-items/wlanlistitem.h b/src/frontend/list-items/wlanlistitem.h index 97393ebf..641af74e 100644 --- a/src/frontend/list-items/wlanlistitem.h +++ b/src/frontend/list-items/wlanlistitem.h @@ -8,6 +8,7 @@ #include #include "kylinactiveconnectresource.h" #include +#include "enterprisewlandialog.h" #include @@ -63,6 +64,7 @@ private: private: KyWirelessNetItem m_wirelessNetItem; KyWirelessConnectOperation *m_wirelessConnectOperation = nullptr; + EnterpriseWlanDialog *enterpriseWlanDialog = nullptr; bool m_hasPwd = true; QString m_wlanDevice;