From 40548a7995147f3f99212928ae27047de7a79618 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 22 Aug 2021 20:10:49 +0200 Subject: Deprecate BaseJob::Data The grand plan is to get rid of `BaseJob` and turn job invocations to function calls returning `QFuture`. `RequestData` will stay though, feeding data into those calls. --- lib/jobs/basejob.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/jobs/basejob.h') diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h index 7ce4b808..7750fb8b 100644 --- a/lib/jobs/basejob.h +++ b/lib/jobs/basejob.h @@ -72,7 +72,8 @@ public: }; Q_ENUM(StatusCode) - using Data = RequestData; + using Data Q_DECL_DEPRECATED_X("Use Quotient::RequestData instead") // + = RequestData; /*! * This structure stores the status of a server call job. The status @@ -125,7 +126,8 @@ public: BaseJob(HttpVerb verb, const QString& name, const QString& endpoint, bool needsToken = true); BaseJob(HttpVerb verb, const QString& name, const QString& endpoint, - const QUrlQuery& query, Data&& data = {}, bool needsToken = true); + const QUrlQuery& query, RequestData&& data = {}, + bool needsToken = true); QUrl requestUrl() const; bool isBackground() const; @@ -330,8 +332,8 @@ protected: void setRequestHeaders(const headers_t& headers); const QUrlQuery& query() const; void setRequestQuery(const QUrlQuery& query); - const Data& requestData() const; - void setRequestData(Data&& data); + const RequestData& requestData() const; + void setRequestData(RequestData&& data); const QByteArrayList& expectedContentTypes() const; void addExpectedContentType(const QByteArray& contentType); void setExpectedContentTypes(const QByteArrayList& contentTypes); -- cgit v1.2.3 From c26015503aa0fbca37abdfc4870ac94bb7befeee Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 22 Aug 2021 20:19:15 +0200 Subject: Drop other stuff deprecated pre- or early 0.6 BaseJob: StatusCode::JsonParseError Connection: resolved() and reconnected() signals; roomMap(); postReceipt() User: bridged() and rawName() ConnectionData: setHost() and setPort() StateEventBase: prev_content() --- lib/jobs/basejob.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/jobs/basejob.h') diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h index 7750fb8b..835cd822 100644 --- a/lib/jobs/basejob.h +++ b/lib/jobs/basejob.h @@ -52,8 +52,6 @@ public: IncorrectRequestError = IncorrectRequest, IncorrectResponse, IncorrectResponseError = IncorrectResponse, - JsonParseError //< \deprecated Use IncorrectResponse instead - = IncorrectResponse, TooManyRequests, TooManyRequestsError = TooManyRequests, RateLimited = TooManyRequests, -- cgit v1.2.3 From 93cee89f9a99e51275ac9cd304180499b0543eea Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 22 Aug 2021 20:45:53 +0200 Subject: Fix building with MSVC --- lib/jobs/basejob.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/jobs/basejob.h') diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h index 835cd822..29443c53 100644 --- a/lib/jobs/basejob.h +++ b/lib/jobs/basejob.h @@ -70,7 +70,10 @@ public: }; Q_ENUM(StatusCode) - using Data Q_DECL_DEPRECATED_X("Use Quotient::RequestData instead") // + using Data +#ifndef Q_CC_MSVC + Q_DECL_DEPRECATED_X("Use Quotient::RequestData instead") +#endif = RequestData; /*! -- cgit v1.2.3