mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
style(abstractnetwork): remove chain of if else.
Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
parent
800c5d71ff
commit
3003a87c79
@ -303,14 +303,18 @@ QByteArray AbstractNetworkJob::requestId()
|
||||
QString AbstractNetworkJob::errorString() const
|
||||
{
|
||||
if (_timedout) {
|
||||
return tr("Connection timed out");
|
||||
} else if (!reply()) {
|
||||
return tr("Unknown error: network reply was deleted");
|
||||
} else if (reply()->hasRawHeader("OC-ErrorString")) {
|
||||
return reply()->rawHeader("OC-ErrorString");
|
||||
} else {
|
||||
return networkReplyErrorString(*reply());
|
||||
return tr("The server took too long to respond. Check your connection and try syncing again. If it still doesn’t work, reach out to your server administrator.");
|
||||
}
|
||||
|
||||
if (!reply()) {
|
||||
return tr("An unexpected error occurred. Please try syncing again or contact contact your server administrator if the issue continues.");
|
||||
}
|
||||
|
||||
if (reply()->hasRawHeader("OC-ErrorString")) {
|
||||
return reply()->rawHeader("OC-ErrorString");
|
||||
}
|
||||
|
||||
return networkReplyErrorString(*reply());
|
||||
}
|
||||
|
||||
QString AbstractNetworkJob::errorStringParsingBody(QByteArray *body)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user