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

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>2022-04-29 13:41:48 +0300
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>2022-04-29 13:53:38 +0300
commit558c6cb1f6720b2d57c04205745b8606f61ea04b (patch)
tree206c248bf16f369d5bef86c8c3fe632063802123 /src/gui
parent6798f2ca31579b64ea192311d43ca4bb61c45b97 (diff)
adjust API of retry count to have everything private and simpler
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accountstate.cpp12
-rw-r--r--src/gui/accountstate.h7
2 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index a5bacfa2a..eacfec718 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -131,7 +131,7 @@ void AccountState::setState(State state)
emit isConnectedChanged();
}
if (_state == Connected) {
- setRetryCount(0);
+ resetRetryCount();
}
}
@@ -330,9 +330,9 @@ void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status sta
_lastCheckConnectionTimer.start();
};
- const auto resetRetryCount = [this]() {
+ const auto resetRetryConnection = [this]() {
qCInfo(lcAccountState) << "reset retry count";
- setRetryCount(0);
+ resetRetryCount();
_lastCheckConnectionTimer.invalidate();
_lastCheckConnectionTimer.start();
};
@@ -373,7 +373,7 @@ void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status sta
case ConnectionValidator::Connected:
if (_state != Connected) {
setState(Connected);
- resetRetryCount();
+ resetRetryConnection();
// Get the Apps available on the server.
fetchNavigationApps();
@@ -504,9 +504,9 @@ void AccountState::fetchNavigationApps(){
job->getNavigationApps();
}
-void AccountState::setRetryCount(int count)
+void AccountState::resetRetryCount()
{
- _retryCount = count;
+ _retryCount = 0;
}
void AccountState::slotEtagResponseHeaderReceived(const QByteArray &value, int statusCode){
diff --git a/src/gui/accountstate.h b/src/gui/accountstate.h
index c9d9acbea..0a489c149 100644
--- a/src/gui/accountstate.h
+++ b/src/gui/accountstate.h
@@ -106,9 +106,6 @@ public:
State state() const;
static QString stateString(State state);
- int retryCount() const;
- void increaseRetryCount();
-
bool isSignedOut() const;
AccountAppList appList() const;
@@ -191,7 +188,9 @@ private:
void setState(State state);
void fetchNavigationApps();
- void setRetryCount(int count);
+ int retryCount() const;
+ void increaseRetryCount();
+ void resetRetryCount();
signals:
void stateChanged(State state);