ui/network: update known connections after adding tethering connection. (#32166)

update known connections
old-commit-hash: 40b061cd51078c3ca3a0f58ccfce6a9078fb08ef
This commit is contained in:
Dean Lee
2024-04-15 08:52:20 +08:00
committed by GitHub
parent 104d78cbd0
commit 164ae65250

View File

@@ -428,7 +428,10 @@ void WifiManager::addTetheringConnection() {
connection["ipv4"]["route-metric"] = 1100;
connection["ipv6"]["method"] = "ignore";
call(NM_DBUS_PATH_SETTINGS, NM_DBUS_INTERFACE_SETTINGS, "AddConnection", QVariant::fromValue(connection));
auto path = call<QDBusObjectPath>(NM_DBUS_PATH_SETTINGS, NM_DBUS_INTERFACE_SETTINGS, "AddConnection", QVariant::fromValue(connection));
if (!path.path().isEmpty()) {
knownConnections[path] = tethering_ssid;
}
}
void WifiManager::tetheringActivated(QDBusPendingCallWatcher *call) {