删除eventfilter内无用代码
This commit is contained in:
parent
c60276ef91
commit
4dfb699615
|
@ -167,12 +167,7 @@ bool NetConnect::eventFilter(QObject *w, QEvent *e) {
|
|||
if (!wiredSwitch->isCheckable()) {
|
||||
showDesktopNotify(tr("No ethernet device avaliable"));
|
||||
} else {
|
||||
if (deviceStatusMap.count() == 0) {
|
||||
wiredSwitch->setCheckable(false);
|
||||
wiredSwitch->setChecked(false);
|
||||
} else {
|
||||
m_interface->call(QStringLiteral("setWiredSwitchEnable"), !wiredSwitch->isChecked());
|
||||
}
|
||||
m_interface->call(QStringLiteral("setWiredSwitchEnable"), !wiredSwitch->isChecked());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,12 +226,7 @@ bool WlanConnect::eventFilter(QObject *w, QEvent *e) {
|
|||
if (!m_wifiSwitch->isCheckable()) {
|
||||
showDesktopNotify(tr("No wireless network card detected"));
|
||||
} else {
|
||||
if (deviceList.isEmpty()) {
|
||||
m_wifiSwitch->setCheckable(false);
|
||||
m_wifiSwitch->setChecked(false);
|
||||
} else {
|
||||
m_interface->call(QStringLiteral("setWirelessSwitchEnable"), !m_wifiSwitch->isChecked());
|
||||
}
|
||||
m_interface->call(QStringLiteral("setWirelessSwitchEnable"), !m_wifiSwitch->isChecked());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue