This error code is available now that Interface is built with Qt 5.3.
Showing the changes to libraries/script-engine/src/XMLHttpRequestClass.cpp (1 of 1 file). Show all
Unified · Split
| @@ -66,7 +66,7 @@ QScriptValue XMLHttpRequestClass::getStatus() const { · 65 unmodified lines | ||
| 66 | 66 | return QScriptValue(200); |
| 67 | 67 | case QNetworkReply::ContentNotFoundError: |
| 68 | 68 | return QScriptValue(404); |
| 69 | − case QNetworkReply::ContentAccessDenied: | |
| 69 | + case QNetworkReply::ContentConflictError: | |
| 70 | 70 | return QScriptValue(409); |
| 71 | 71 | case QNetworkReply::TimeoutError: |
| 72 | 72 | return QScriptValue(408); |
| @@ -89,7 +89,7 @@ QString XMLHttpRequestClass::getStatusText() const { · 16 unmodified lines | ||
| 89 | 89 | return "OK"; |
| 90 | 90 | case QNetworkReply::ContentNotFoundError: |
| 91 | 91 | return "Not Found"; |
| 92 | − case QNetworkReply::ContentAccessDenied: | |
| 92 | + case QNetworkReply::ContentConflictError: | |
| 93 | 93 | return "Conflict"; |
| 94 | 94 | case QNetworkReply::TimeoutError: |
| 95 | 95 | return "Timeout"; |
| @@ -196,8 +196,7 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a · 100 unmodified lines | ||
| 196 | 196 | } else if (!_file->open(QIODevice::ReadOnly)) { |
| 197 | 197 | qDebug() << "Can't open file " << _url.fileName(); |
| 198 | 198 | abortRequest(); |
| 199 | − //_errorCode = QNetworkReply::ContentConflictError; // TODO: Use this status when update to Qt 5.3 | |
| 200 | − _errorCode = QNetworkReply::ContentAccessDenied; | |
| 199 | + _errorCode = QNetworkReply::ContentConflictError; | |
| 201 | 200 | setReadyState(DONE); |
| 202 | 201 | emit requestComplete(); |
| 203 | 202 | } else { |