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 | return QScriptValue(200); | 66 | return QScriptValue(200); |
| 67 | case QNetworkReply::ContentNotFoundError: | 67 | case QNetworkReply::ContentNotFoundError: |
| 68 | return QScriptValue(404); | 68 | return QScriptValue(404); |
| 69 | case QNetworkReply::ContentAccessDenied: | 69 | case QNetworkReply::ContentConflictError: |
| 70 | return QScriptValue(409); | 70 | return QScriptValue(409); |
| 71 | case QNetworkReply::TimeoutError: | 71 | case QNetworkReply::TimeoutError: |
| 72 | return QScriptValue(408); | 72 | return QScriptValue(408); |
| @@ -89,7 +89,7 @@ QString XMLHttpRequestClass::getStatusText() const { · 16 unmodified lines | |||
| 89 | return "OK"; | 89 | return "OK"; |
| 90 | case QNetworkReply::ContentNotFoundError: | 90 | case QNetworkReply::ContentNotFoundError: |
| 91 | return "Not Found"; | 91 | return "Not Found"; |
| 92 | case QNetworkReply::ContentAccessDenied: | 92 | case QNetworkReply::ContentConflictError: |
| 93 | return "Conflict"; | 93 | return "Conflict"; |
| 94 | case QNetworkReply::TimeoutError: | 94 | case QNetworkReply::TimeoutError: |
| 95 | return "Timeout"; | 95 | return "Timeout"; |
| @@ -196,8 +196,7 @@ void XMLHttpRequestClass::open(const QString& method, const QString& url, bool a · 100 unmodified lines | |||
| 196 | } else if (!_file->open(QIODevice::ReadOnly)) { | 196 | } else if (!_file->open(QIODevice::ReadOnly)) { |
| 197 | qDebug() << "Can't open file " << _url.fileName(); | 197 | qDebug() << "Can't open file " << _url.fileName(); |
| 198 | abortRequest(); | 198 | abortRequest(); |
| 199 | //_errorCode = QNetworkReply::ContentConflictError; // TODO: Use this status when update to Qt 5.3 | 199 | _errorCode = QNetworkReply::ContentConflictError; |
| 200 | _errorCode = QNetworkReply::ContentAccessDenied; | ||
| 201 | setReadyState(DONE); | 200 | setReadyState(DONE); |
| 202 | emit requestComplete(); | 201 | emit requestComplete(); |
| 203 | } else { | 202 | } else { |