Skip to content

Commit 195c3dc

Browse files
committed
fix
1 parent d75a885 commit 195c3dc

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/gui/accountstate.cpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,13 @@ void AccountState::tagLastSuccessfullETagRequest(const QDateTime &tp)
292292

293293
void AccountState::checkConnectivity(bool blockJobs)
294294
{
295-
if (_state != Connected) {
296-
setState(Connecting);
297-
}
298-
qCWarning(lcAccountState) << "checkConnectivity blocking:" << blockJobs;
299295
if (isSignedOut()) {
300296
return;
301297
}
298+
qCWarning(lcAccountState) << "checkConnectivity blocking:" << blockJobs;
299+
if (_state != Connected) {
300+
setState(Connecting);
301+
}
302302
if (_tlsDialog) {
303303
qCDebug(lcAccountState) << "Skip checkConnectivity, waiting for tls dialog";
304304
return;
@@ -512,7 +512,9 @@ void AccountState::slotCredentialsFetched()
512512
qCInfo(lcAccountState) << "Fetched credentials for" << _account->url().toString()
513513
<< "attempting to connect";
514514
_waitingForNewCredentials = false;
515-
checkConnectivity();
515+
if (!isSignedOut()) {
516+
checkConnectivity();
517+
}
516518
}
517519

518520
void AccountState::slotCredentialsAsked()

test/testoauth.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class OAuthTestCase : public QObject
127127
account->setUrl(sOAuthTestServer);
128128
// the account seizes ownership over the qnam in account->setCredentials(...) by keeping a shared pointer on it
129129
// therefore, we should never call fakeAm->setThis(...)
130-
account->setCredentials(new FakeCredentials {account.get(), fakeAm });
130+
account->setCredentials(new FakeCredentials{account.get(), fakeAm});
131131
fakeAm->setOverride([this](QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *device) {
132132
if (req.url().path().endsWith(QLatin1String(".well-known/openid-configuration"))) {
133133
return this->wellKnownReply(op, req);

test/testutils/syncenginetestutils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ class FakeCredentials : public OCC::AbstractCredentials
543543
public:
544544
FakeCredentials(OCC::Account *account, OCC::AccessManager *am)
545545
: OCC::AbstractCredentials(account)
546-
,_am { am }
546+
, _am{am}
547547
{
548548
}
549549

0 commit comments

Comments
 (0)