From 941cfdf8b591bf14002f28e99e06c200dc5bcc84 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 28 Jul 2018 18:57:29 +0900 Subject: csapi/third_party_lookup.*: Properly pass a variadic (aka exploded) parameters Most of the actual change was in the API definition files (thanks to @anoadragon453), plus a converter from a QJsonObject map to the URL query string. --- lib/converters.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/converters.h') diff --git a/lib/converters.h b/lib/converters.h index 1a8f3cfa..1e828393 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -331,6 +331,12 @@ namespace QMatrixClient q.addQueryItem(k, v); } + inline void addTo(QUrlQuery& q, const QString&, const QJsonObject& vals) + { + for (auto it = vals.begin(); it != vals.end(); ++it) + q.addQueryItem(it.key(), it.value().toString()); + } + // This one is for types that don't have isEmpty() template struct AddNode -- cgit v1.2.3