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/room_send.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/csapi/room_send.cpp') diff --git a/lib/csapi/room_send.cpp b/lib/csapi/room_send.cpp index 9637a205..2b39ede2 100644 --- a/lib/csapi/room_send.cpp +++ b/lib/csapi/room_send.cpp @@ -18,8 +18,10 @@ class SendMessageJob::Private QString eventId; }; +static const auto SendMessageJobName = QStringLiteral("SendMessageJob"); + SendMessageJob::SendMessageJob(const QString& roomId, const QString& eventType, const QString& txnId, const QJsonObject& body) - : BaseJob(HttpVerb::Put, "SendMessageJob", + : BaseJob(HttpVerb::Put, SendMessageJobName, basePath % "/rooms/" % roomId % "/send/" % eventType % "/" % txnId) , d(new Private) { @@ -36,7 +38,7 @@ const QString& SendMessageJob::eventId() const BaseJob::Status SendMessageJob::parseJson(const QJsonDocument& data) { auto json = data.object(); - d->eventId = fromJson(json.value("event_id")); + d->eventId = fromJson(json.value("event_id"_ls)); return Success; } -- cgit v1.2.3