January 2016
Beginner
512 pages
12h 35m
English
Fortunately, QNetworkReply offers several possibilities to do this. In the slot called downloadFinished(), we first want to check whether an error occurred:
if (reply->error() != QNetworkReply::NoError) {/* error occurred */}The QNetworkReply::error() function returns the error that occurred while handling the request. The error is encoded as a value of the QNetworkReply::NetworkError type. The two most common errors are probably these:
|
Error code |
Meaning |
|---|---|
|
|
This error indicates that the URL of the request could not be found. It is similar to the HTTP error code 404. |
|
|
This error indicates that you do not have the permission to access the requested ... |