|
|
|
@ -162,8 +162,8 @@ SecurityType WifiManager::getSecurityType(const QVariantMap &properties) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void WifiManager::connect(const Network &n, const QString &password, const QString &username) { |
|
|
|
|
forgetConnection(n.ssid); // Clear all connections that may already exist to the network we are connecting
|
|
|
|
|
setCurrentConnecting(n.ssid); |
|
|
|
|
forgetConnection(n.ssid); // Clear all connections that may already exist to the network we are connecting
|
|
|
|
|
Connection connection; |
|
|
|
|
connection["connection"]["type"] = "802-11-wireless"; |
|
|
|
|
connection["connection"]["uuid"] = QUuid::createUuid().toString().remove('{').remove('}'); |
|
|
|
@ -225,7 +225,6 @@ void WifiManager::forgetConnection(const QString &ssid) { |
|
|
|
|
if (!path.path().isEmpty()) { |
|
|
|
|
call(path.path(), NM_DBUS_INTERFACE_SETTINGS_CONNECTION, "Delete"); |
|
|
|
|
} |
|
|
|
|
setCurrentConnecting(""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint WifiManager::getAdapterType(const QDBusObjectPath &path) { |
|
|
|
@ -257,6 +256,7 @@ void WifiManager::stateChange(unsigned int new_state, unsigned int previous_stat |
|
|
|
|
if (new_state == NM_DEVICE_STATE_NEED_AUTH && change_reason == NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT && !connecting_to_network.isEmpty()) { |
|
|
|
|
forgetConnection(connecting_to_network); |
|
|
|
|
emit wrongPassword(connecting_to_network); |
|
|
|
|
setCurrentConnecting(""); |
|
|
|
|
} else if (new_state == NM_DEVICE_STATE_ACTIVATED) { |
|
|
|
|
// connecting_to_network = "";
|
|
|
|
|
setCurrentConnecting(""); |
|
|
|
|