mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix(network): 没有刷新列表及搜索显示正在加载中状态
代码错误,在显示的时候需要同时更新扫描图标的状态 Log: 解决在显示的时候没有刷新列表及搜索显示正在加载中状态 Bug: https://pms.uniontech.com/zentao/bug-view-36840.html
This commit is contained in:
parent
1449922028
commit
a7863c5b4f
@ -463,10 +463,7 @@ bool NetworkItem::eventFilter(QObject *obj, QEvent *event)
|
||||
wirelessItem->requestWirelessScan();
|
||||
}
|
||||
}
|
||||
m_loadingIndicator->setLoading(true);
|
||||
QTimer::singleShot(1000, this, [ = ] {
|
||||
m_loadingIndicator->setLoading(false);
|
||||
});
|
||||
wirelessScan();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -1268,3 +1265,13 @@ bool NetworkItem::isShowControlCenter()
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void NetworkItem::wirelessScan()
|
||||
{
|
||||
if (m_loadingIndicator->loading())
|
||||
return;
|
||||
m_loadingIndicator->setLoading(true);
|
||||
QTimer::singleShot(1000, this, [ = ] {
|
||||
m_loadingIndicator->setLoading(false);
|
||||
});
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ public:
|
||||
public slots:
|
||||
void updateSelf();
|
||||
void refreshIcon();
|
||||
void wirelessScan();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
|
@ -225,6 +225,8 @@ void NetworkPlugin::onDeviceListChanged(const QList<NetworkDevice *> devices)
|
||||
|
||||
connect(static_cast<WirelessItem *>(item), &WirelessItem::deviceStateChanged,
|
||||
m_networkItem, &NetworkItem::updateSelf);
|
||||
connect(static_cast<WirelessItem *>(item), &WirelessItem::requestWirelessScan,
|
||||
m_networkItem, &NetworkItem::wirelessScan);
|
||||
|
||||
m_networkWorker->queryAccessPoints(path);
|
||||
m_networkWorker->requestWirelessScan();
|
||||
|
Loading…
x
Reference in New Issue
Block a user