aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-01 16:26:56 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-01 16:26:56 +0900
commit00ff511ab11fae58eb9dc43879f2483a9f303263 (patch)
tree804a23d1aa6ad6dd0669882c3107a5ed0edad7b3 /lib/jobs
parent12478cf7330727083103d22f76de92c4aa476f5b (diff)
parentd3ddd394e855cfe217bf0f0d368822c9b99316bb (diff)
downloadlibquotient-00ff511ab11fae58eb9dc43879f2483a9f303263.tar.gz
libquotient-00ff511ab11fae58eb9dc43879f2483a9f303263.zip
Merge branch 'master' into forget-rooms-really
Diffstat (limited to 'lib/jobs')
-rw-r--r--lib/jobs/basejob.cpp2
-rw-r--r--lib/jobs/basejob.h34
2 files changed, 21 insertions, 15 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp
index dbf197ec..6ad8d971 100644
--- a/lib/jobs/basejob.cpp
+++ b/lib/jobs/basejob.cpp
@@ -560,8 +560,6 @@ QString BaseJob::statusCaption() const
return tr("Request was abandoned");
case NetworkError:
return tr("Network problems");
- case JsonParseError:
- return tr("Response could not be parsed");
case TimeoutError:
return tr("Request timed out");
case ContentAccessError:
diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h
index 30ecceb3..d435749a 100644
--- a/lib/jobs/basejob.h
+++ b/lib/jobs/basejob.h
@@ -46,28 +46,36 @@ namespace QMatrixClient
Q_PROPERTY(QUrl requestUrl READ requestUrl CONSTANT)
Q_PROPERTY(int maxRetries READ maxRetries WRITE setMaxRetries)
public:
- /* Just in case, the values are compatible with KJob
- * (which BaseJob used to inherit from). */
enum StatusCode { NoError = 0 // To be compatible with Qt conventions
, Success = 0
, Pending = 1
, WarningLevel = 20
- , UnexpectedResponseTypeWarning = 21
+ , UnexpectedResponseType = 21
+ , UnexpectedResponseTypeWarning = UnexpectedResponseType
, Abandoned = 50 //< A very brief period between abandoning and object deletion
, ErrorLevel = 100 //< Errors have codes starting from this
, NetworkError = 100
- , JsonParseError // TODO: Merge into IncorrectResponseError
- , TimeoutError
+ , Timeout
+ , TimeoutError = Timeout
, ContentAccessError
, NotFoundError
- , IncorrectRequestError
- , IncorrectResponseError
- , TooManyRequestsError
- , RequestNotImplementedError
- , UnsupportedRoomVersionError
- , NetworkAuthRequiredError
- , UserConsentRequiredError
- , UserDefinedError = 200
+ , IncorrectRequest
+ , IncorrectRequestError = IncorrectRequest
+ , IncorrectResponse
+ , IncorrectResponseError = IncorrectResponse
+ , JsonParseError //< deprecated; Use IncorrectResponse instead
+ = IncorrectResponse
+ , TooManyRequests
+ , TooManyRequestsError = TooManyRequests
+ , RequestNotImplemented
+ , RequestNotImplementedError = RequestNotImplemented
+ , UnsupportedRoomVersion
+ , UnsupportedRoomVersionError = UnsupportedRoomVersion
+ , NetworkAuthRequired
+ , NetworkAuthRequiredError = NetworkAuthRequired
+ , UserConsentRequired
+ , UserConsentRequiredError = UserConsentRequired
+ , UserDefinedError = 256
};
/**