Merge branch 'optimize-notification' into 'dbus-interface'

fix bug 126739网络连接与断开提示优化

See merge request kylin-desktop/kylin-nm!658
This commit is contained in:
赵世旭 2022-07-15 05:47:27 +00:00
commit b0f98e637c
3 changed files with 8 additions and 6 deletions

View File

@ -841,7 +841,7 @@ void LanPage::updateActivatedConnectionArea(KyConnectItem *p_newItem)
deleteConnectionMapItem(m_activeConnectionMap, m_activatedLanListWidget, EMPTY_CONNECT_UUID);
QListWidgetItem *p_listWidgetItem = addNewItem(p_newItem, m_activatedLanListWidget);
m_activeConnectionMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
this->showDesktopNotify(tr("LAN Connected Successfully"), "networkconnected");
// this->showDesktopNotify(tr("LAN Connected Successfully"), "networkconnected");
}
if (m_inactivatedLanListWidget->count() < MAX_ITEMS) {
m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH);
@ -865,7 +865,7 @@ void LanPage::updateConnectionArea(KyConnectItem *p_newItem)
qDebug()<<"[LanPage] update connection item"<<p_newItem->m_connectName;
QListWidgetItem *p_listWidgetItem = insertNewItem(p_newItem, m_inactivatedLanListWidget);
m_inactiveConnectionMap.insert(p_newItem->m_connectUuid, p_listWidgetItem);
this->showDesktopNotify(tr("LAN Disconnected Successfully"), "networkdisconnected");
// this->showDesktopNotify(tr("LAN Disconnected Successfully"), "networkdisconnected");
}
if (m_inactivatedLanListWidget->count() < MAX_ITEMS) {
m_inactivatedLanListWidget->setFixedWidth(MIN_WIDTH);

View File

@ -560,7 +560,7 @@ void WlanPage::onWlanRemoved(QString interface, QString ssid)
} else {
deleteWirelessItemFormMap(m_activateConnectionItemMap,
m_activatedNetListWidget, ssid);
showDesktopNotify(tr("WLAN Disconnected Successfully"), "networkdisconnected");
// showDesktopNotify(tr("WLAN Disconnected Successfully"), "networkdisconnected");
QListWidgetItem *p_listWidgetItem = addEmptyItem(m_activatedNetListWidget);
m_activateConnectionItemMap.insert(EMPTY_SSID, p_listWidgetItem);
@ -812,6 +812,7 @@ void WlanPage::sendApStateChangeSignal(QString uuid,
return;
}
#if 0
void WlanPage::wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::State state,
NetworkManager::ActiveConnection::Reason reason)
{
@ -825,6 +826,7 @@ void WlanPage::wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::St
return;
}
#endif
void WlanPage::updateActivatedArea(QString uuid, QString ssid, QString devName)
{
@ -922,7 +924,7 @@ void WlanPage::onConnectionStateChanged(QString uuid,
!m_activateConnectionItemMap.contains(ssid)) {
qDebug() << "wlan remove before deactivated";
} else {
wlanShowNotify(ssid, state, reason);
// wlanShowNotify(ssid, state, reason);
}
}

View File

@ -170,8 +170,8 @@ private:
void sendApStateChangeSignal(QString uuid, QString ssid, QString deviceName,
NetworkManager::ActiveConnection::State state);
void wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::State state,
NetworkManager::ActiveConnection::Reason reason);
// void wlanShowNotify(QString ssid, NetworkManager::ActiveConnection::State state,
// NetworkManager::ActiveConnection::Reason reason);
private:
QMap<QString, QListWidgetItem*> m_wirelessNetItemMap;