相同信号强度和配置 根据ssid排序
This commit is contained in:
parent
5966e0299e
commit
4a53df57c0
|
@ -5,7 +5,15 @@
|
|||
static bool subWifiListSort(const KyWirelessNetItem info1, const KyWirelessNetItem info2)
|
||||
{
|
||||
if (info1.m_isConfigured == info2.m_isConfigured) {
|
||||
return info1.m_signalStrength >info2.m_signalStrength;
|
||||
if (info1.m_signalStrength != info2.m_signalStrength) {
|
||||
return info1.m_signalStrength >info2.m_signalStrength;
|
||||
} else {
|
||||
if (QString::compare(info1.m_NetSsid, info2.m_NetSsid, Qt::CaseInsensitive) > 0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return info1.m_isConfigured;
|
||||
}
|
||||
|
|
|
@ -1287,6 +1287,7 @@ void WlanPage::onMainWindowVisibleChanged(const bool &visible)
|
|||
//打开页面时先触发一次扫描,然后定时扫描wifi热点和刷新icon
|
||||
requestScan();
|
||||
m_scanTimer->start(AP_SCAN_INTERVAL);
|
||||
onRefreshIconTimer();
|
||||
// m_refreshIconTimer->start(ICON_REFRESH_INTERVAL);
|
||||
} else {
|
||||
//界面关闭的时候,停止wifi扫描和刷新
|
||||
|
|
Loading…
Reference in New Issue