mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-10 20:02:13 +08:00
ui/network: simplify getActiveConnections (#32174)
old-commit-hash: 6de5e0d71a60d307513b3eb3cfdadcb8f8ae145c
This commit is contained in:
@@ -210,16 +210,8 @@ void WifiManager::deactivateConnection(const QDBusObjectPath &path) {
|
||||
}
|
||||
|
||||
QVector<QDBusObjectPath> WifiManager::getActiveConnections() {
|
||||
QVector<QDBusObjectPath> conns;
|
||||
QDBusObjectPath path;
|
||||
const QDBusArgument &arr = call<QDBusArgument>(NM_DBUS_PATH, NM_DBUS_INTERFACE_PROPERTIES, "Get", NM_DBUS_INTERFACE, "ActiveConnections");
|
||||
arr.beginArray();
|
||||
while (!arr.atEnd()) {
|
||||
arr >> path;
|
||||
conns.push_back(path);
|
||||
}
|
||||
arr.endArray();
|
||||
return conns;
|
||||
auto result = call<QDBusArgument>(NM_DBUS_PATH, NM_DBUS_INTERFACE_PROPERTIES, "Get", NM_DBUS_INTERFACE, "ActiveConnections");
|
||||
return qdbus_cast<QVector<QDBusObjectPath>>(result);
|
||||
}
|
||||
|
||||
bool WifiManager::isKnownConnection(const QString &ssid) {
|
||||
|
||||
Reference in New Issue
Block a user