Do not ask for the password when the check server job times up

QNetworkReply::OperationCanceledError may be both because of anthentication
error (because the HTTPCredentials abort the reply) or because of a timeout
(the timer abort the reply). We should only ask for the password if the
reply was canceled because the password was wrong.
This commit is contained in:
Olivier Goffart 2015-03-03 08:33:59 +01:00
parent b3c82fd7b6
commit b43e0f5ebd

View file

@ -140,7 +140,7 @@ void ConnectionValidator::slotAuthFailed(QNetworkReply *reply)
Status stat = Timeout;
if( reply->error() == QNetworkReply::AuthenticationRequiredError ||
reply->error() == QNetworkReply::OperationCanceledError ) { // returned if the user/pwd is wrong.
!_account->credentials()->stillValid(reply)) {
qDebug() << reply->error() << reply->errorString();
qDebug() << "******** Password is wrong!";
_errors << tr("The provided credentials are not correct");