update wlan more item while update wireless net area;modified according to pr suggestions
This commit is contained in:
parent
36ae78280f
commit
d5cde738b7
|
@ -82,10 +82,10 @@ void WlanPage::initWlanUI()
|
||||||
m_inactivatedNetListWidget->setFrameShape(QFrame::Shape::NoFrame);
|
m_inactivatedNetListWidget->setFrameShape(QFrame::Shape::NoFrame);
|
||||||
m_inactivatedNetListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
m_inactivatedNetListWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
m_inactivatedWlanListAreaLayout->addWidget(m_inactivatedNetListWidget);
|
|
||||||
|
|
||||||
addWlanMoreItem();
|
addWlanMoreItem();
|
||||||
|
|
||||||
|
m_inactivatedWlanListAreaLayout->addWidget(m_inactivatedNetListWidget);
|
||||||
|
|
||||||
m_activatedNetListWidget = new QListWidget(m_activatedNetFrame);
|
m_activatedNetListWidget = new QListWidget(m_activatedNetFrame);
|
||||||
m_activatedNetListWidget->setFrameShape(QFrame::Shape::NoFrame);
|
m_activatedNetListWidget->setFrameShape(QFrame::Shape::NoFrame);
|
||||||
m_activatedNetListWidget->setContentsMargins(MAIN_LAYOUT_MARGINS);
|
m_activatedNetListWidget->setContentsMargins(MAIN_LAYOUT_MARGINS);
|
||||||
|
@ -305,8 +305,7 @@ void WlanPage::deleteWirelessItemFormMap(QMap<QString, QListWidgetItem*> &wirele
|
||||||
}
|
}
|
||||||
|
|
||||||
WlanListItem *p_wlanItem = (WlanListItem *)wirelessListWidget->itemWidget(p_listWidgetItem);
|
WlanListItem *p_wlanItem = (WlanListItem *)wirelessListWidget->itemWidget(p_listWidgetItem);
|
||||||
if (nullptr == p_wlanItem)
|
if (nullptr == p_wlanItem) {
|
||||||
{
|
|
||||||
qWarning() << LOG_FLAG << "p_wlanItem is null";
|
qWarning() << LOG_FLAG << "p_wlanItem is null";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -782,6 +781,9 @@ void WlanPage::updateWirelessNetArea(QString uuid, QString ssid, QString devName
|
||||||
QListWidgetItem *p_listWidgetItem = addNewItem(wirelessNetItem, m_inactivatedNetListWidget);
|
QListWidgetItem *p_listWidgetItem = addNewItem(wirelessNetItem, m_inactivatedNetListWidget);
|
||||||
m_wirelessNetItemMap.insert(wirelessNetItem.m_NetSsid, p_listWidgetItem);
|
m_wirelessNetItemMap.insert(wirelessNetItem.m_NetSsid, p_listWidgetItem);
|
||||||
|
|
||||||
|
// 更新‘更多’条目,以保证其处于listwidget的最底部
|
||||||
|
addWlanMoreItem();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -977,7 +979,7 @@ void WlanPage::onRefreshIconTimer()
|
||||||
|
|
||||||
if (nullptr == p_wlanItem) {
|
if (nullptr == p_wlanItem) {
|
||||||
qDebug() << LOG_FLAG << "p_wlanItem is null continue";
|
qDebug() << LOG_FLAG << "p_wlanItem is null continue";
|
||||||
continue;
|
continue;//暂时先保持continue,后续讨论是否使用break直接跳出循环
|
||||||
}
|
}
|
||||||
|
|
||||||
// 该item是‘更多’条目,不需要更新
|
// 该item是‘更多’条目,不需要更新
|
||||||
|
|
Loading…
Reference in New Issue