Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Aug 4, 2023
1 parent 23eb1d7 commit 7b438f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/gui/accountstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,13 @@ void AccountState::tagLastSuccessfullETagRequest(const QDateTime &tp)

void AccountState::checkConnectivity(bool blockJobs)
{
if (_state != Connected) {
setState(Connecting);
}
qCWarning(lcAccountState) << "checkConnectivity blocking:" << blockJobs;
if (isSignedOut()) {
return;
}
qCWarning(lcAccountState) << "checkConnectivity blocking:" << blockJobs;
if (_state != Connected) {
setState(Connecting);
}
if (_tlsDialog) {
qCDebug(lcAccountState) << "Skip checkConnectivity, waiting for tls dialog";
return;
Expand Down Expand Up @@ -512,7 +512,9 @@ void AccountState::slotCredentialsFetched()
qCInfo(lcAccountState) << "Fetched credentials for" << _account->url().toString()
<< "attempting to connect";
_waitingForNewCredentials = false;
checkConnectivity();
if (!isSignedOut()) {
checkConnectivity();
}
}

void AccountState::slotCredentialsAsked()
Expand Down
2 changes: 1 addition & 1 deletion test/testoauth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class OAuthTestCase : public QObject
account->setUrl(sOAuthTestServer);
// the account seizes ownership over the qnam in account->setCredentials(...) by keeping a shared pointer on it
// therefore, we should never call fakeAm->setThis(...)
account->setCredentials(new FakeCredentials {account.get(), fakeAm });
account->setCredentials(new FakeCredentials{account.get(), fakeAm});
fakeAm->setOverride([this](QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *device) {
if (req.url().path().endsWith(QLatin1String(".well-known/openid-configuration"))) {
return this->wellKnownReply(op, req);
Expand Down
2 changes: 1 addition & 1 deletion test/testutils/syncenginetestutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ class FakeCredentials : public OCC::AbstractCredentials
public:
FakeCredentials(OCC::Account *account, OCC::AccessManager *am)
: OCC::AbstractCredentials(account)
,_am { am }
, _am{am}
{
}

Expand Down

0 comments on commit 7b438f3

Please sign in to comment.