MailTransport
gmailpasswordrequester.cpp
30 auto promise = KGAPI2::AccountManager::instance()->findAccount(apiKey, transport()->userName(), {KGAPI2::Account::mailScopeUrl()});
31 connect(promise, &KGAPI2::AccountPromise::finished, this, [forceRefresh, this](KGAPI2::AccountPromise *promise) {
34 promise = KGAPI2::AccountManager::instance()->refreshTokens(apiKey, apiSecret, transport()->userName());
40 promise = KGAPI2::AccountManager::instance()->getAccount(apiKey, apiSecret, transport()->userName(), {KGAPI2::Account::mailScopeUrl()});
42 connect(promise, &KGAPI2::AccountPromise::finished, this, &GmailPasswordRequester::onTokenRequestFinished);
49 qCWarning(MAILTRANSPORT_SMTP_LOG) << "Error obtaining XOAUTH2 Gmail token:" << promise->errorText();
55 const QString tokens = QStringLiteral("%1\001%2").arg(account->accessToken(), account->refreshToken());
void finished(KGAPI2::AccountPromise *self)
static QUrl mailScopeUrl()
Represents the settings of a specific mail transport.
Definition transport.h:33
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString arg(Args &&... args) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.