diff --git a/selfdrive/ui/qt/network/wifi_manager.cc b/selfdrive/ui/qt/network/wifi_manager.cc index cb7cccd194..0c50d02f4f 100644 --- a/selfdrive/ui/qt/network/wifi_manager.cc +++ b/selfdrive/ui/qt/network/wifi_manager.cc @@ -210,16 +210,8 @@ void WifiManager::deactivateConnection(const QDBusObjectPath &path) { } QVector WifiManager::getActiveConnections() { - QVector conns; - QDBusObjectPath path; - const QDBusArgument &arr = call(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(NM_DBUS_PATH, NM_DBUS_INTERFACE_PROPERTIES, "Get", NM_DBUS_INTERFACE, "ActiveConnections"); + return qdbus_cast>(result); } bool WifiManager::isKnownConnection(const QString &ssid) {