Merge branch '1025' into 'dbus-interface'
未插入有线网卡消息提示&无线忘记网络后状态更新 See merge request kylin-desktop/kylin-nm!367
This commit is contained in:
commit
05323e4953
|
@ -268,11 +268,15 @@ void KyWirelessNetResource::getDeviceByUuid(const QString uuid, QString &deviceN
|
|||
NetworkManager::ActiveConnection::Ptr activeConnectionPtr = m_networkResourceInstance->getActiveConnect(uuid);
|
||||
if (!activeConnectionPtr.isNull()) {
|
||||
QStringList interfaces = activeConnectionPtr->devices();
|
||||
if (interfaces.size() > 0) {
|
||||
QString ifaceUni = interfaces.at(0);
|
||||
NetworkManager::Device:: Ptr devicePtr =
|
||||
m_networkResourceInstance->findDeviceUni(ifaceUni);
|
||||
deviceName = devicePtr->interfaceName();
|
||||
return;
|
||||
} else {
|
||||
qDebug() << LOG_FLAG << "get device of active connection failed.";
|
||||
}
|
||||
}
|
||||
|
||||
NetworkManager::Connection::Ptr connectPtr = m_networkResourceInstance->getConnect(uuid);
|
||||
|
@ -407,7 +411,7 @@ void KyWirelessNetResource::onWifiNetworkPropertyChange(NetworkManager::Wireless
|
|||
QList<KyWirelessNetItem>::iterator iter = m_WifiNetworkList[devIface].begin();
|
||||
while (iter != m_WifiNetworkList[devIface].end()) {
|
||||
if (iter->m_NetSsid == net->ssid()) {
|
||||
qDebug()<< LOG_FLAG <<"recive properity changed signal, sender is" << iter->m_NetSsid;
|
||||
// qDebug()<< LOG_FLAG <<"recive properity changed signal, sender is" << iter->m_NetSsid;
|
||||
if (iter->m_signalStrength != net->signalStrength()) {
|
||||
iter->m_signalStrength = net->signalStrength();
|
||||
emit signalStrengthChange(devIface, net->ssid(), iter->m_signalStrength);
|
||||
|
|
|
@ -171,7 +171,8 @@ void LanPage::onSwithGsettingsChanged(const QString &key)
|
|||
|
||||
void LanPage::onLanSwitchClicked()
|
||||
{
|
||||
qDebug()<<"[LanPage] On lan switch button clicked! Status:" <<m_netSwitch->getSwitchStatus();
|
||||
qDebug()<<"[LanPage] On lan switch button clicked! Status:" <<m_netSwitch->getSwitchStatus()
|
||||
<<"devices count:"<<m_devList.count();
|
||||
|
||||
if (m_devList.count() == 0) {
|
||||
this->showDesktopNotify(tr("No ethernet device avaliable"));
|
||||
|
@ -184,16 +185,6 @@ void LanPage::onLanSwitchClicked()
|
|||
m_switchGsettings->set(WIRED_SWITCH,false);
|
||||
}
|
||||
}
|
||||
|
||||
// if (m_netSwitch->getSwitchStatus()) {
|
||||
// if (m_devList.count() > 0) {
|
||||
// m_switchGsettings->set(WIRED_SWITCH, true);
|
||||
// } else {
|
||||
// this->showDesktopNotify(tr("No ethernet device avaliable"));
|
||||
// }
|
||||
// } else {
|
||||
// m_switchGsettings->set(WIRED_SWITCH, false);
|
||||
// }
|
||||
}
|
||||
|
||||
void LanPage::getEnabledDevice(QStringList &enableDeviceList)
|
||||
|
|
|
@ -538,6 +538,8 @@ void WlanPage::updateWlanListItem(QString ssid)
|
|||
if (p_listWidgetItem) {
|
||||
WlanListItem *p_wlanItem = (WlanListItem *)m_inactivatedNetListWidget->itemWidget(p_listWidgetItem);
|
||||
p_wlanItem->updateWirelessNetItem(wirelessNetItem);
|
||||
p_wlanItem->updateConnectState(Deactivated);
|
||||
emit this->wlanConnectChanged(Deactivated);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,9 +86,11 @@ void SwitchButton::startAnimation() { //滑动按钮动作播放
|
|||
/* 按钮按下处理 */
|
||||
void SwitchButton::mousePressEvent(QMouseEvent *event) {
|
||||
Q_UNUSED(event);
|
||||
if (!m_enabled)
|
||||
return QWidget::mousePressEvent(event);
|
||||
// if (!m_enabled)
|
||||
// return QWidget::mousePressEvent(event);
|
||||
if (m_enabled) {
|
||||
m_bIsOn = !m_bIsOn;
|
||||
}
|
||||
|
||||
Q_EMIT clicked(m_bIsOn);
|
||||
|
||||
|
|
Loading…
Reference in New Issue