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_rule.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/csapi/definitions/push_rule.cpp') diff --git a/lib/csapi/definitions/push_rule.cpp b/lib/csapi/definitions/push_rule.cpp index 98f5d788..833135ec 100644 --- a/lib/csapi/definitions/push_rule.cpp +++ b/lib/csapi/definitions/push_rule.cpp @@ -9,12 +9,12 @@ using namespace QMatrixClient; QJsonObject QMatrixClient::toJson(const PushRule& pod) { QJsonObject _json; - addParam<>(_json, "actions", pod.actions); - addParam<>(_json, "default", pod.isDefault); - addParam<>(_json, "enabled", pod.enabled); - addParam<>(_json, "rule_id", pod.ruleId); - addParam(_json, "conditions", pod.conditions); - addParam(_json, "pattern", pod.pattern); + addParam<>(_json, QStringLiteral("actions"), pod.actions); + addParam<>(_json, QStringLiteral("default"), pod.isDefault); + addParam<>(_json, QStringLiteral("enabled"), pod.enabled); + addParam<>(_json, QStringLiteral("rule_id"), pod.ruleId); + addParam(_json, QStringLiteral("conditions"), pod.conditions); + addParam(_json, QStringLiteral("pattern"), pod.pattern); return _json; } @@ -23,17 +23,17 @@ PushRule FromJson::operator()(const QJsonValue& jv) const auto& _json = jv.toObject(); PushRule result; result.actions = - fromJson>(_json.value("actions")); + fromJson>(_json.value("actions"_ls)); result.isDefault = - fromJson(_json.value("default")); + fromJson(_json.value("default"_ls)); result.enabled = - fromJson(_json.value("enabled")); + fromJson(_json.value("enabled"_ls)); result.ruleId = - fromJson(_json.value("rule_id")); + fromJson(_json.value("rule_id"_ls)); result.conditions = - fromJson>(_json.value("conditions")); + fromJson>(_json.value("conditions"_ls)); result.pattern = - fromJson(_json.value("pattern")); + fromJson(_json.value("pattern"_ls)); return result; } -- cgit v1.2.3