🐞 fix(wifi管理): 更换网络状态变化接口

This commit is contained in:
huheng@kylinos.cn 2022-12-05 16:09:51 +08:00
parent 7640d268ee
commit a2401c4b6d
2 changed files with 5 additions and 4 deletions

View File

@ -13,8 +13,9 @@
WifiManager::~WifiManager() {}
void WifiManager::onPropertiesChanged(QVariantMap map)
void WifiManager::onPropertiesChanged(QString str, QVariantMap map)
{
Q_UNUSED(str);
Q_UNUSED(map);
QString wifiIP = checkWifiConnectivity();
if (!m_wifiIP.isEmpty()) {
@ -137,6 +138,6 @@ void WifiManager::startWifiInfo()
Q_EMIT sigWifiDisconnected();
}
QDBusConnection::systemBus().connect("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager",
"org.freedesktop.NetworkManager", "PropertiesChanged", this,
SLOT(onPropertiesChanged(QVariantMap)));
"org.freedesktop.DBus.Properties", "PropertiesChanged", this,
SLOT(onPropertiesChanged(QString, QVariantMap)));
}

View File

@ -29,7 +29,7 @@ public Q_SLOTS:
void startWifiInfo();
void onPropertiesChanged(QVariantMap map);
void onPropertiesChanged(QString str, QVariantMap map);
private:
QString m_wifiIP = "";