aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/push_rule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/push_rule.cpp')
-rw-r--r--lib/csapi/definitions/push_rule.cpp24
1 files changed, 12 insertions, 12 deletions
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<IfNotEmpty>(_json, "conditions", pod.conditions);
- addParam<IfNotEmpty>(_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<IfNotEmpty>(_json, QStringLiteral("conditions"), pod.conditions);
+ addParam<IfNotEmpty>(_json, QStringLiteral("pattern"), pod.pattern);
return _json;
}
@@ -23,17 +23,17 @@ PushRule FromJson<PushRule>::operator()(const QJsonValue& jv)
const auto& _json = jv.toObject();
PushRule result;
result.actions =
- fromJson<QVector<QVariant>>(_json.value("actions"));
+ fromJson<QVector<QVariant>>(_json.value("actions"_ls));
result.isDefault =
- fromJson<bool>(_json.value("default"));
+ fromJson<bool>(_json.value("default"_ls));
result.enabled =
- fromJson<bool>(_json.value("enabled"));
+ fromJson<bool>(_json.value("enabled"_ls));
result.ruleId =
- fromJson<QString>(_json.value("rule_id"));
+ fromJson<QString>(_json.value("rule_id"_ls));
result.conditions =
- fromJson<QVector<PushCondition>>(_json.value("conditions"));
+ fromJson<QVector<PushCondition>>(_json.value("conditions"_ls));
result.pattern =
- fromJson<QString>(_json.value("pattern"));
+ fromJson<QString>(_json.value("pattern"_ls));
return result;
}