Merge branch 'dbus-interface-fork' into 'dbus-interface'

解决因关闭无线热点时信号顺序造成的卡顿问题

See merge request kylin-desktop/kylin-nm!667
This commit is contained in:
陈学超 2022-07-21 06:24:21 +00:00
commit 8828bf0378
1 changed files with 8 additions and 9 deletions

View File

@ -67,7 +67,7 @@ void MobileHotspotWidget::showDesktopNotify(const QString &message)
iface.callWithArgumentList(QDBus::AutoDetect,"Notify",args); iface.callWithArgumentList(QDBus::AutoDetect,"Notify",args);
} }
//#define HOTSPOT_CONTROL #define HOTSPOT_CONTROL
MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent) MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
{ {
@ -154,6 +154,13 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
qDebug() << "[MobileHotspotWidget] call deactiveWirelessAp failed "; qDebug() << "[MobileHotspotWidget] call deactiveWirelessAp failed ";
return true; return true;
} }
#ifdef HOTSPOT_CONTROL
deleteActivePathInterface();
m_connectDevPage->setInterface(nullptr);
m_connectDevPage->refreshStalist();
m_blacklistPage->refreshBlacklist();
#endif
this->update();
} else { } else {
if (m_apNameLine->text().isEmpty() || m_interfaceName.isEmpty()) if (m_apNameLine->text().isEmpty() || m_interfaceName.isEmpty())
{ {
@ -604,14 +611,6 @@ void MobileHotspotWidget::onDeviceNameChanged(QString oldName, QString newName,
//热点断开 //热点断开
void MobileHotspotWidget::onHotspotDeactivated(QString devName, QString ssid) void MobileHotspotWidget::onHotspotDeactivated(QString devName, QString ssid)
{ {
#ifdef HOTSPOT_CONTROL
deleteActivePathInterface();
m_connectDevPage->setInterface(nullptr);
m_connectDevPage->refreshStalist();
m_blacklistPage->refreshBlacklist();
#endif
this->update();
if (!m_switchBtn->isChecked()) { if (!m_switchBtn->isChecked()) {
return; return;
} }