aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-05 19:21:54 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-09 11:54:39 +0900
commitb142117d78a2a4ce21e818c62cb7a10cff80af0d (patch)
tree13a964e9afd13d294ad1085a3cb5429952929b1b /jobs
parent986fc27e451b21cdd118e74da9e9ff22e275ef75 (diff)
downloadlibquotient-b142117d78a2a4ce21e818c62cb7a10cff80af0d.tar.gz
libquotient-b142117d78a2a4ce21e818c62cb7a10cff80af0d.zip
BaseJob: Provide a simplified constructor
Diffstat (limited to 'jobs')
-rw-r--r--jobs/basejob.cpp4
-rw-r--r--jobs/basejob.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/jobs/basejob.cpp b/jobs/basejob.cpp
index 980814c4..74031909 100644
--- a/jobs/basejob.cpp
+++ b/jobs/basejob.cpp
@@ -96,6 +96,10 @@ QDebug QMatrixClient::operator<<(QDebug dbg, const BaseJob::Status& s)
<< QString(s.message).replace(filter, "\\1 HIDDEN");
}
+BaseJob::BaseJob(HttpVerb verb, const QString& name, const QString& endpoint, bool needsToken)
+ : BaseJob(verb, name, endpoint, Query { }, Data { }, needsToken)
+{ }
+
BaseJob::BaseJob(HttpVerb verb, const QString& name, const QString& endpoint,
const Query& query, const Data& data, bool needsToken)
: d(new Private(verb, endpoint, query, data, needsToken))
diff --git a/jobs/basejob.h b/jobs/basejob.h
index 1d7f2388..1fe3a24d 100644
--- a/jobs/basejob.h
+++ b/jobs/basejob.h
@@ -130,7 +130,9 @@ namespace QMatrixClient
public:
BaseJob(HttpVerb verb, const QString& name, const QString& endpoint,
- const Query& query = {}, const Data& data = {},
+ bool needsToken = true);
+ BaseJob(HttpVerb verb, const QString& name, const QString& endpoint,
+ const Query& query, const Data& data = {},
bool needsToken = true);
Status status() const;