aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/syncjob.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-23 19:20:45 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-12-08 20:12:25 +0900
commita0053484024a85ae47dcd2b464cb15c0f85109e5 (patch)
tree200ece411a5aeb72fea518c238f784f2ccccf92b /lib/jobs/syncjob.cpp
parent9628594881346c8e06594e65d3befafc310e12d5 (diff)
downloadlibquotient-a0053484024a85ae47dcd2b464cb15c0f85109e5.tar.gz
libquotient-a0053484024a85ae47dcd2b464cb15c0f85109e5.zip
SyncJob: accept Filter instead of QString for the filter
Diffstat (limited to 'lib/jobs/syncjob.cpp')
-rw-r--r--lib/jobs/syncjob.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/jobs/syncjob.cpp b/lib/jobs/syncjob.cpp
index ac0f6685..84385b55 100644
--- a/lib/jobs/syncjob.cpp
+++ b/lib/jobs/syncjob.cpp
@@ -42,6 +42,13 @@ SyncJob::SyncJob(const QString& since, const QString& filter, int timeout,
setMaxRetries(std::numeric_limits<int>::max());
}
+SyncJob::SyncJob(const QString& since, const Filter& filter,
+ int timeout, const QString& presence)
+ : SyncJob(since,
+ QJsonDocument(toJson(filter)).toJson(QJsonDocument::Compact),
+ timeout, presence)
+{ }
+
BaseJob::Status SyncJob::parseJson(const QJsonDocument& data)
{
d.parseJson(data.object());