Commit 6a968cdb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Merge remote-tracking branch 'origin/KDE/4.14'

Conflicts:
	mailtransport/transport.cpp
	mailtransport/transportmanager.cpp
parents 602cca09 6ece63ba
......@@ -232,6 +232,7 @@ void Transport::usrRead()
bool Transport::usrSave()
{
if (requiresAuthentication() && storePassword() && d->passwordDirty) {
const QString storePassword = d->password;
Wallet *wallet = TransportManager::self()->wallet();
if (!wallet || wallet->writePassword(QString::number(id()), d->password) != 0) {
// wallet saving failed, ask if we should store in the config file instead
......@@ -250,7 +251,7 @@ bool Transport::usrSave()
KGuiItem(i18n("Do Not Store Password"))) == KMessageBox::Yes) {
// write to config file
KConfigGroup group(config(), currentGroup());
group.writeEntry("password", KStringHandler::obscure(d->password));
group.writeEntry("password", KStringHandler::obscure(storePassword));
d->storePasswordInFile = true;
}
}
......
......@@ -413,6 +413,12 @@ void TransportManager::removeTransport(int id)
d->transports.removeAll(t);
d->validateDefault();
QString group = t->currentGroup();
if (t->storePassword()) {
Wallet *currentWallet = wallet();
if ( currentWallet ) {
currentWallet->removeEntry( QString::number(t->id()) );
}
}
delete t;
d->config->deleteGroup(group);
d->writeConfig();
......
Markdown is supported
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