Commit ca0ff919 authored by Laurent Montel's avatar Laurent Montel
Browse files

GIT_SILENT: coding style

parent 5e98c0d3
Pipeline #32631 passed with stage
in 19 minutes and 11 seconds
......@@ -34,9 +34,9 @@ QList<QByteArray> FakeServer::greetingAndEhlo(bool multiline)
QList<QByteArray> FakeServer::bye()
{
return {
"C: QUIT",
"S: 221 So long, and thanks for all the fish",
"X: "
"C: QUIT",
"S: 221 So long, and thanks for all the fish",
"X: "
};
}
......
......@@ -188,22 +188,22 @@ void SmtpJob::startPasswordRetrieval(bool forceRefresh)
GOOGLE_API_KEY, transport()->userName(), { KGAPI2::Account::mailScopeUrl() });
connect(promise, &KGAPI2::AccountPromise::finished,
this, [forceRefresh, this](KGAPI2::AccountPromise *promise) {
if (promise->account()) {
if (forceRefresh) {
promise = KGAPI2::AccountManager::instance()->refreshTokens(
GOOGLE_API_KEY, GOOGLE_API_SECRET, transport()->userName());
} else {
onTokenRequestFinished(promise);
return;
}
} else {
promise = KGAPI2::AccountManager::instance()->getAccount(
GOOGLE_API_KEY, GOOGLE_API_SECRET, transport()->userName(),
{ KGAPI2::Account::mailScopeUrl() });
}
connect(promise, &KGAPI2::AccountPromise::finished,
this, &SmtpJob::onTokenRequestFinished);
});
if (promise->account()) {
if (forceRefresh) {
promise = KGAPI2::AccountManager::instance()->refreshTokens(
GOOGLE_API_KEY, GOOGLE_API_SECRET, transport()->userName());
} else {
onTokenRequestFinished(promise);
return;
}
} else {
promise = KGAPI2::AccountManager::instance()->getAccount(
GOOGLE_API_KEY, GOOGLE_API_SECRET, transport()->userName(),
{ KGAPI2::Account::mailScopeUrl() });
}
connect(promise, &KGAPI2::AccountPromise::finished,
this, &SmtpJob::onTokenRequestFinished);
});
} else {
startLoginJob();
}
......@@ -226,7 +226,6 @@ void SmtpJob::onTokenRequestFinished(KGAPI2::AccountPromise *promise)
startLoginJob();
}
void SmtpJob::startLoginJob()
{
if (!transport()->requiresAuthentication()) {
......@@ -241,9 +240,9 @@ void SmtpJob::startLoginJob()
&& transport()->authenticationType() != Transport::EnumAuthenticationType::GSSAPI) {
QPointer<KPasswordDialog> dlg
= new KPasswordDialog(
nullptr,
KPasswordDialog::ShowUsernameLine
|KPasswordDialog::ShowKeepPassword);
nullptr,
KPasswordDialog::ShowUsernameLine
|KPasswordDialog::ShowKeepPassword);
dlg->setPrompt(i18n("You need to supply a username and a password "
"to use this SMTP server."));
dlg->setKeepPassword(transport()->storePassword());
......@@ -365,7 +364,7 @@ void SmtpJob::slotResult(KJob *job)
return;
}
if (qobject_cast<KSmtp::LoginJob*>(job)) {
if (qobject_cast<KSmtp::LoginJob *>(job)) {
if (job->error() == KSmtp::LoginJob::TokenExpired) {
startPasswordRetrieval(/*force refresh */ true);
return;
......
......@@ -14,8 +14,7 @@ class SMTPMailTransportPlugin : public MailTransport::TransportAbstractPlugin
{
Q_OBJECT
public:
explicit SMTPMailTransportPlugin(QObject *parent = nullptr, const QList<QVariant> & =
{
explicit SMTPMailTransportPlugin(QObject *parent = nullptr, const QList<QVariant> & = {
});
~SMTPMailTransportPlugin() override;
......
......@@ -71,7 +71,7 @@ void PrecommandJob::start()
void PreCommandJobPrivate::slotStarted()
{
Q_EMIT q->infoMessage(q, i18n("Executing precommand"),
i18n("Executing precommand '%1'.", precommand));
i18n("Executing precommand '%1'.", precommand));
}
void PreCommandJobPrivate::slotError(QProcess::ProcessError error)
......
......@@ -68,7 +68,8 @@ public:
bool handleNntpConversation(MailTransport::Socket *socket, int type, int *stage, const QString &response, bool *shouldStartTLS);
QVector<int> parseAuthenticationList(const QStringList &authentications);
inline bool isGmail(const QString &server) const {
inline bool isGmail(const QString &server) const
{
return server.endsWith(QLatin1String("gmail.com")) || server.endsWith(QLatin1String("googlemail.com"));
}
......
......@@ -623,7 +623,9 @@ void TransportManager::loadPasswordsAsync()
d->wallet = Wallet::openWallet(Wallet::NetworkWallet(), window,
Wallet::Asynchronous);
if (d->wallet) {
connect(d->wallet, &KWallet::Wallet::walletOpened, this, [this](bool status) { d->slotWalletOpened(status);});
connect(d->wallet, &KWallet::Wallet::walletOpened, this, [this](bool status) {
d->slotWalletOpened(status);
});
d->walletAsyncOpen = true;
} else {
d->walletOpenFailed = true;
......
......@@ -13,7 +13,6 @@
#include <QList>
#include <QObject>
namespace KWallet {
class Wallet;
}
......
......@@ -133,10 +133,10 @@ void TransportManagementWidget::Private::removeClicked()
}
const int rc
= KMessageBox::questionYesNo(
q,
i18n("Do you want to remove outgoing account '%1'?",
ui.transportList->currentItem()->text(0)),
i18n("Remove outgoing account?"));
q,
i18n("Do you want to remove outgoing account '%1'?",
ui.transportList->currentItem()->text(0)),
i18n("Remove outgoing account?"));
if (rc == KMessageBox::No) {
return;
}
......
......@@ -17,8 +17,7 @@ class AkonadiMailTransportPlugin : public MailTransport::TransportAbstractPlugin
{
Q_OBJECT
public:
explicit AkonadiMailTransportPlugin(QObject *parent = nullptr, const QList<QVariant> & =
{
explicit AkonadiMailTransportPlugin(QObject *parent = nullptr, const QList<QVariant> & = {
});
~AkonadiMailTransportPlugin() override;
......
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