feat: 优化ip冲突检测逻辑

后端DbusNetwork::IPConflict(QString in0, QString in1),in0可能不是本机上的ip地址,导致进入3秒钟ip冲突自检中。
添加代码过滤非本机ip冲突检测的情况

Log: 优化任务栏ip冲突检测逻辑
Task: https://pms.uniontech.com/zentao/task-view-81757.html
Change-Id: I13c2e23cddfec08056a65577075dd036d4dcc1bc
This commit is contained in:
songwentao 2021-08-04 11:03:50 +08:00 committed by yanghongwei
parent 05907c7fbc
commit ae71dc9945

View File

@ -592,6 +592,10 @@ void NetworkItem::onThemeTypeChanged(DGuiApplicationHelper::ColorType themeType)
*/
void NetworkItem::ipConfllict(const QString &in0, const QString &in1)
{
// 如果不是本机ip则不进行后面处理
if (!currentIpList().contains(in0))
return;
// ip冲突的数据才写入m_ipAndMacMap
if (!in1.isEmpty())
m_ipAndMacMap.insert(in0, in1);