Skip to content

Commit 22c5f90

Browse files
ut003640deepin-bot[bot]
authored andcommitted
fix: Fix failure to update network details after a newly inserted device connects to the network
When a new device is inserted, its 'managed' property is false. After it becomes true, the device object is created, but the signals of the newly created device are not connected. As a result, when the device status changes, the network status is not updated. Log: Fix failure to update network details after a newly inserted device connects to the network PMS: BUG-286921 fix: 修复新插入设备连接网络后无法更新网络详情 新插入设备的时候,该设备的managed为false,等它变成true后再创建设备对象,并未连接新创建的设备的信号,所以当设备状态变化的时候,没有更新网络状态 Log: 修复新插入设备连接网络后无法更新网络详情 PMS: BUG-286921
1 parent 7b365a4 commit 22c5f90

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/impl/networkmanager/networkmanagerprocesser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ void NetworkManagerProcesser::createOrRemoveDevice(const QString &path)
196196
if (!deviceExist(device->uni())) {
197197
NetworkDeviceBase *newDevice = createDevice(device);
198198
if (newDevice) {
199+
connect(newDevice, &NetworkDeviceBase::deviceStatusChanged, this, &NetworkManagerProcesser::onUpdateNetworkDetail);
200+
connect(newDevice, &NetworkDeviceBase::activeConnectionChanged, this, &NetworkManagerProcesser::onUpdateNetworkDetail);
201+
connect(newDevice, &NetworkDeviceBase::ipV4Changed, this, &NetworkManagerProcesser::onUpdateNetworkDetail);
199202
m_devices << newDevice;
200203
sortDevice();
201204
updateDeviceName();

0 commit comments

Comments
 (0)