From 61884d1adab3091edd39e3f9130f39892f33eb9a Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Fri, 30 Aug 2019 05:35:36 +0200 Subject: [PATCH] fix indents, add comment Signed-off-by: Michael Schuster --- src/gui/creds/webflowcredentials.cpp | 15 +++++++-------- src/gui/creds/webflowcredentials.h | 12 ++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/gui/creds/webflowcredentials.cpp b/src/gui/creds/webflowcredentials.cpp index 63d56f513..b34e6e054 100644 --- a/src/gui/creds/webflowcredentials.cpp +++ b/src/gui/creds/webflowcredentials.cpp @@ -160,7 +160,7 @@ void WebFlowCredentials::askFromUser() { } QString msg = tr("You have been logged out of %1 as user %2. Please login again") - .arg(_account->displayName(), _user); + .arg(_account->displayName(), _user); _askDialog->setInfo(msg); _askDialog->show(); @@ -177,7 +177,7 @@ void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, qCInfo(lcWebFlowCredentials()) << "Authed with the wrong user!"; QString msg = tr("Please login with the user: %1") - .arg(_user); + .arg(_user); _askDialog->setError(msg); if (!_askDialog->isUsingFlow2()) { @@ -439,7 +439,7 @@ void WebFlowCredentials::slotReadClientCertPEMJobDone(QKeychain::Job *incomingJo #if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) Q_ASSERT(!incomingJob->insecureFallback()); // If insecureFallback is set, the next test would be pointless if (_retryOnKeyChainError && (incomingJob->error() == QKeychain::NoBackendAvailable - || incomingJob->error() == QKeychain::OtherError)) { + || incomingJob->error() == QKeychain::OtherError)) { // Could be that the backend was not yet available. Wait some extra seconds. // (Issues #4274 and #6522) // (For kwallet, the error is OtherError instead of NoBackendAvailable, maybe a bug in QtKeychain) @@ -587,20 +587,19 @@ void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) { if (_keychainMigration && _ready) { _keychainMigration = false; persist(); - deleteKeychainEntries(true); + deleteKeychainEntries(true); // true: delete old entries qCInfo(lcWebFlowCredentials) << "Migrated old keychain entries"; } } -void WebFlowCredentials::deleteKeychainEntries(bool oldKeychainEntries) -{ +void WebFlowCredentials::deleteKeychainEntries(bool oldKeychainEntries) { auto startDeleteJob = [this, oldKeychainEntries](QString user) { DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName()); addSettingsToJob(_account, job); job->setInsecureFallback(true); job->setKey(keychainKey(_account->url().toString(), - user, - oldKeychainEntries ? QString() : _account->id())); + user, + oldKeychainEntries ? QString() : _account->id())); job->start(); }; diff --git a/src/gui/creds/webflowcredentials.h b/src/gui/creds/webflowcredentials.h index 34c1a84c0..0e02568ec 100644 --- a/src/gui/creds/webflowcredentials.h +++ b/src/gui/creds/webflowcredentials.h @@ -14,7 +14,7 @@ class QNetworkReply; class QAuthenticator; namespace QKeychain { -class Job; + class Job; } namespace OCC { @@ -32,11 +32,11 @@ public: explicit WebFlowCredentials(); WebFlowCredentials( - const QString &user, - const QString &password, - const QSslCertificate &certificate = QSslCertificate(), - const QSslKey &key = QSslKey(), - const QList &caCertificates = QList()); + const QString &user, + const QString &password, + const QSslCertificate &certificate = QSslCertificate(), + const QSslKey &key = QSslKey(), + const QList &caCertificates = QList()); QString authType() const override; QString user() const override;