fix bug:140403

This commit is contained in:
jzxc95 2022-09-26 13:45:36 +08:00
parent cd1735ca69
commit 10dacdcccd
3 changed files with 21 additions and 1 deletions

View File

@ -149,6 +149,25 @@ KyConnectItem * KyConnectResourse::getConnectionItemByUuid(QString connectUuid)
return nullptr;
}
KyConnectItem * KyConnectResourse::getConnectionItemByUuidWithoutActivateChecking(QString connectUuid)
{
NetworkManager::Connection::Ptr connectPtr =
m_networkResourceInstance->getConnect(connectUuid);
if (nullptr == connectPtr) {
qWarning()<< "[KyConnectResourse]" <<"get connect failed, connect uuid"<<connectUuid;
return nullptr;
}
KyConnectItem *connectItem = getConnectionItem(connectPtr, "");
if (nullptr != connectItem) {
//connectItem->dumpInfo();
return connectItem;
}
return nullptr;
}
KyConnectItem * KyConnectResourse::getConnectionItemByUuid(QString connectUuid, QString deviceName)
{
NetworkManager::Connection::Ptr connectPtr =

View File

@ -38,6 +38,7 @@ public:
public:
KyConnectItem *getConnectionItemByUuid(QString connectUuid);
KyConnectItem *getConnectionItemByUuidWithoutActivateChecking(QString connectUuid);
KyConnectItem *getConnectionItemByUuid(QString connectUuid, QString deviceName);
void getConnectionList(QString deviceName,
NetworkManager::ConnectionSettings::ConnectionType connectionType,

View File

@ -947,7 +947,7 @@ void LanPage::onConnectionStateChange(QString uuid,
updateActivatedConnectionArea(p_newItem);
updateConnectionState(m_activeConnectionMap, m_activatedLanListWidget, uuid, (ConnectState)state);
} else if (state == NetworkManager::ActiveConnection::State::Deactivated) {
p_newItem = m_connectResourse->getConnectionItemByUuid(uuid);
p_newItem = m_connectResourse->getConnectionItemByUuidWithoutActivateChecking(uuid);
qDebug() << "[LanPage] deactivated reason" << reason;
if (nullptr == p_newItem) {
qWarning()<<"[LanPage] get active connection failed, connection uuid" << uuid;