mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Use more appropriate QNetworkReply error code
This error code is available now that Interface is built with Qt 5.3.
This commit is contained in:
parent
037726815b
commit
17925c7a81
1 changed files with 3 additions and 4 deletions
|
@ -66,7 +66,7 @@ QScriptValue XMLHttpRequestClass::getStatus() const {
|
|||
return QScriptValue(200);
|
||||
case QNetworkReply::ContentNotFoundError:
|
||||
return QScriptValue(404);
|
||||
case QNetworkReply::ContentAccessDenied:
|
||||
case QNetworkReply::ContentConflictError:
|
||||
return QScriptValue(409);
|
||||
case QNetworkReply::TimeoutError:
|
||||
return QScriptValue(408);
|
||||
|
@ -89,7 +89,7 @@ QString XMLHttpRequestClass::getStatusText() const {
|
|||
return "OK";
|
||||
case QNetworkReply::ContentNotFoundError:
|
||||
return "Not Found";
|
||||
case QNetworkReply::ContentAccessDenied:
|
||||
case QNetworkReply::ContentConflictError:
|
||||
return "Conflict";
|
||||
case QNetworkReply::TimeoutError:
|
||||
return "Timeout";
|
||||
|
@ -196,8 +196,7 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a
|
|||
} else if (!_file->open(QIODevice::ReadOnly)) {
|
||||
qDebug() << "Can't open file " << _url.fileName();
|
||||
abortRequest();
|
||||
//_errorCode = QNetworkReply::ContentConflictError; // TODO: Use this status when update to Qt 5.3
|
||||
_errorCode = QNetworkReply::ContentAccessDenied;
|
||||
_errorCode = QNetworkReply::ContentConflictError;
|
||||
setReadyState(DONE);
|
||||
emit requestComplete();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue