Commit 191aa39b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make sure to load password

parent 95a34210
Pipeline #47540 passed with stage
in 14 minutes and 31 seconds
......@@ -32,6 +32,7 @@ Transport::Transport(const QString &cfgGroup)
d->storePasswordInFile = false;
d->needsWalletMigration = false;
load();
loadPassword();
}
Transport::~Transport()
......@@ -44,12 +45,16 @@ bool Transport::isValid() const
return (id() > 0) && !host().isEmpty() && port() <= 65536;
}
QString Transport::password()
void Transport::loadPassword()
{
if (!d->passwordLoaded && requiresAuthentication() && storePassword()
&& d->password.isEmpty()) {
readPassword();
}
}
QString Transport::password()
{
return d->password;
}
......
......@@ -140,6 +140,7 @@ private Q_SLOTS:
private:
void readTransportPasswordFinished(QKeychain::Job *baseJob);
void loadPassword();
TransportPrivate *const d;
};
} // namespace MailTransport
......
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