From 3dd6b5e6cc50aafce74b21b5a0bf4b26a9fcf6ee Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 2 Jul 2018 17:58:34 +0900 Subject: Use QStringLiteral() and operator"" _ls() in network jobs --- lib/csapi/definitions/push_condition.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/csapi/definitions/push_condition.cpp') diff --git a/lib/csapi/definitions/push_condition.cpp b/lib/csapi/definitions/push_condition.cpp index b8595ec6..19351ae1 100644 --- a/lib/csapi/definitions/push_condition.cpp +++ b/lib/csapi/definitions/push_condition.cpp @@ -9,10 +9,10 @@ using namespace QMatrixClient; QJsonObject QMatrixClient::toJson(const PushCondition& pod) { QJsonObject _json; - addParam<>(_json, "kind", pod.kind); - addParam(_json, "key", pod.key); - addParam(_json, "pattern", pod.pattern); - addParam(_json, "is", pod.is); + addParam<>(_json, QStringLiteral("kind"), pod.kind); + addParam(_json, QStringLiteral("key"), pod.key); + addParam(_json, QStringLiteral("pattern"), pod.pattern); + addParam(_json, QStringLiteral("is"), pod.is); return _json; } @@ -21,13 +21,13 @@ PushCondition FromJson::operator()(const QJsonValue& jv) const auto& _json = jv.toObject(); PushCondition result; result.kind = - fromJson(_json.value("kind")); + fromJson(_json.value("kind"_ls)); result.key = - fromJson(_json.value("key")); + fromJson(_json.value("key"_ls)); result.pattern = - fromJson(_json.value("pattern")); + fromJson(_json.value("pattern"_ls)); result.is = - fromJson(_json.value("is")); + fromJson(_json.value("is"_ls)); return result; } -- cgit v1.2.3