Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2020-12-07 17:23:12 +0300
committerHannah von Reth <vonreth@kde.org>2021-01-13 12:13:33 +0300
commit8bc0b574fbea4f0d0fac4b2c762f77cbace8684b (patch)
tree722073067af261d98d7ee2b4b132c90baa43f354 /src/gui/accountstate.cpp
parentd3b5651615a8775f699f4cd584bd64853b13a50d (diff)
Implement dedicated JobQueue
Diffstat (limited to 'src/gui/accountstate.cpp')
-rw-r--r--src/gui/accountstate.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index d794705fe..9b11af0a2 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -82,6 +82,7 @@ AccountState::AccountState(AccountPtr account)
this, &AccountState::slotCredentialsAsked);
connect(account.data(), &Account::unknownConnectionState,
this, [this] {
+ _account->jobQueue()->setBlocked(true);
checkConnectivity(true);
});
connect(account.data(), &Account::requestUrlUpdate, this, [this](const QUrl &newUrl) {
@@ -134,6 +135,7 @@ void AccountState::setState(State state)
if (_state == SignedOut) {
_connectionStatus = ConnectionValidator::Undefined;
_connectionErrors.clear();
+ _account->jobQueue()->clear();
} else if (oldState == SignedOut && _state == Disconnected) {
// If we stop being voluntarily signed-out, try to connect and
// auth right now!
@@ -147,6 +149,7 @@ void AccountState::setState(State state)
}
if (oldState == Connected || _state == Connected) {
emit isConnectedChanged();
+ _account->jobQueue()->setBlocked(false);
}
}