Skip to content

Commit

Permalink
[vpn] Remove credentials when deleting VPN connection. Contributes to…
Browse files Browse the repository at this point in the history
… JB#42600
  • Loading branch information
Joona Petrell committed Aug 21, 2018
1 parent 928e910 commit cdfc987
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vpnmodel.cpp
Expand Up @@ -502,6 +502,11 @@ void VpnModel::deleteConnection(const QString &path)
});
}
} else {
const QString location(CredentialsRepository::locationForObjectPath(path));
if (credentials_.credentialsExist(location)) {
credentials_.removeCredentials(location);
}

QDBusPendingCall call = connmanVpn_.Remove(QDBusObjectPath(path));
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this);
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, path](QDBusPendingCallWatcher *watcher) {
Expand Down

0 comments on commit cdfc987

Please sign in to comment.