aboutsummaryrefslogtreecommitdiff
path: root/jobs/basejob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'jobs/basejob.cpp')
-rw-r--r--jobs/basejob.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index a50e9f84..5c1be0f0 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -65,7 +65,7 @@ class BaseJob::Private
QTimer timer;
};
-inline QDebug operator<<(QDebug dbg, BaseJob* j)
+inline QDebug operator<<(QDebug dbg, const BaseJob* j)
{
return dbg << "Job" << j->objectName();
}
@@ -160,6 +160,8 @@ void BaseJob::gotReply()
BaseJob::Status BaseJob::checkReply(QNetworkReply* reply) const
{
+ if (reply->error() != QNetworkReply::NoError)
+ qDebug() << this << "returned" << reply->error();
switch( reply->error() )
{
case QNetworkReply::NoError:
@@ -170,6 +172,12 @@ BaseJob::Status BaseJob::checkReply(QNetworkReply* reply) const
case QNetworkReply::ContentOperationNotPermittedError:
return { ContentAccessError, reply->errorString() };
+ case QNetworkReply::ProtocolInvalidOperationError:
+ return { IncorrectRequestError, reply->errorString() };
+
+ case QNetworkReply::ContentNotFoundError:
+ return { NotFoundError, reply->errorString() };
+
default:
return { NetworkError, reply->errorString() };
}