Commit 026bd215 authored by Lamarque Souza's avatar Lamarque Souza
Browse files

When deleting a connection do not open kwallet if it is not needed.

CCBUG: 275161
CCBUG: 274702
parent ac18e8da
......@@ -753,9 +753,6 @@ bool ManageConnectionWidget::deleteConnection(QString id, Knm::Connection::Scope
if (scope == Knm::Connection::System)
mSystemSettings->removeConnection(id);
else {
// remove secrets from wallet if using encrypted storage
Knm::ConnectionPersistence::deleteSecrets(id);
// delete everything related, like certificates
QFile connFile(KStandardDirs::locateLocal("data",
Knm::ConnectionPersistence::CONNECTION_PERSISTENCE_PATH + id));
......@@ -768,6 +765,12 @@ bool ManageConnectionWidget::deleteConnection(QString id, Knm::Connection::Scope
(Knm::ConnectionPersistence::SecretStorageMode)KNetworkManagerServicePrefs::self()->secretStorageMode());
connectionPersistence->load();
con->removeCertificates();
if (con->hasSecrets()) {
// remove secrets from wallet if using encrypted storage
Knm::ConnectionPersistence::deleteSecrets(id);
}
delete(connectionPersistence);
delete(con);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment