🐞 fix(wifi管理): 更换网络状态变化接口
This commit is contained in:
parent
7640d268ee
commit
a2401c4b6d
|
@ -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)));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public Q_SLOTS:
|
|||
|
||||
void startWifiInfo();
|
||||
|
||||
void onPropertiesChanged(QVariantMap map);
|
||||
void onPropertiesChanged(QString str, QVariantMap map);
|
||||
|
||||
private:
|
||||
QString m_wifiIP = "";
|
||||
|
|
Loading…
Reference in New Issue