diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-07-02 10:35:45 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-07-02 10:35:45 +0200 |
commit | 74dda96855b6245b09a8f7eb0512b4457b18a6b7 (patch) | |
tree | e1a058152d433f9f7a3e31d545470b873bb8cb3b /lib | |
parent | 7aa6e7c300779f652558397bcb7bb3b726d30cb9 (diff) | |
download | libquotient-74dda96855b6245b09a8f7eb0512b4457b18a6b7.tar.gz libquotient-74dda96855b6245b09a8f7eb0512b4457b18a6b7.zip |
Actually delete BaseJob::Query
It was a tiny wrapper around QUrlQuery to facilitate creation from
an initializer list - however, Mustache templates long changed to
not actually used that additional constructor.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/jobs/basejob.cpp | 4 | ||||
-rw-r--r-- | lib/jobs/basejob.h | 16 |
2 files changed, 3 insertions, 17 deletions
diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp index c27c6a89..9a7b9b5e 100644 --- a/lib/jobs/basejob.cpp +++ b/lib/jobs/basejob.cpp @@ -175,11 +175,11 @@ public: BaseJob::BaseJob(HttpVerb verb, const QString& name, const QString& endpoint, bool needsToken) - : BaseJob(verb, name, endpoint, Query {}, Data {}, needsToken) + : BaseJob(verb, name, endpoint, QUrlQuery {}, Data {}, needsToken) {} BaseJob::BaseJob(HttpVerb verb, const QString& name, const QString& endpoint, - const Query& query, Data&& data, bool needsToken) + const QUrlQuery &query, Data&& data, bool needsToken) : d(new Private(verb, endpoint, query, std::move(data), needsToken)) { setObjectName(name); diff --git a/lib/jobs/basejob.h b/lib/jobs/basejob.h index ca91a781..d33d542e 100644 --- a/lib/jobs/basejob.h +++ b/lib/jobs/basejob.h @@ -72,20 +72,6 @@ public: }; Q_ENUM(StatusCode) - /** - * A simple wrapper around QUrlQuery that allows its creation from - * a list of string pairs - */ - class Query : public QUrlQuery { - public: - using QUrlQuery::QUrlQuery; - Query() = default; - Query(const std::initializer_list<QPair<QString, QString>>& l) - { - setQueryItems(l); - } - }; - using Data = RequestData; /*! @@ -139,7 +125,7 @@ public: BaseJob(HttpVerb verb, const QString& name, const QString& endpoint, bool needsToken = true); BaseJob(HttpVerb verb, const QString& name, const QString& endpoint, - const Query& query, Data&& data = {}, bool needsToken = true); + const QUrlQuery& query, Data&& data = {}, bool needsToken = true); QUrl requestUrl() const; bool isBackground() const; |