diff options
author | Raquel Medina <raquel.medina@konsulko.com> | 2020-04-09 16:39:32 +0200 |
---|---|---|
committer | Raquel Medina <raquel.medina@konsulko.com> | 2020-04-09 18:26:04 +0200 |
commit | e57b4f75b55c2befad4f9944f43c8aa2310321b7 (patch) | |
tree | 4fe80cd71e3ecbc5344bf15e06336073cc99fb33 /responsemessage.cpp | |
parent | 0ed292d3ccf93c889734960676a321d1166d3f66 (diff) |
add missing overrides in ResponseMessage
The original message hierarchy rework patch
is missing functionality which results in received
replies being discarded.
Basically, ResponseMessage class is
missing the override required to match replies to
the original calls.
Bug-AGL: SPEC-3112
Fixes: 0ed292d3ccf9 (rework Message hierarchy)
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: I39030ef212b2175a590deca02f9f9ff41bf7abf4
Diffstat (limited to 'responsemessage.cpp')
-rw-r--r-- | responsemessage.cpp | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/responsemessage.cpp b/responsemessage.cpp index 96dab97..9f8e6f2 100644 --- a/responsemessage.cpp +++ b/responsemessage.cpp @@ -22,35 +22,10 @@ #include "responsemessage.h" -//deprecated method call new constructor and setAdditionalData() instead: -ResponseMessage::ResponseMessage(QByteArray request) -{ - - QJsonDocument jdoc(QJsonDocument::fromJson(request)); - - if (!jdoc.isArray()) { - qWarning("Invalid appfw message: not an array"); - return; - } - - QJsonArray msg = jdoc.array(); - - if (msg.size() != 4) { - qWarning("Invalid appfw message: invalid array size"); - return; - } - - QStringList api_str_list = msg[2].toString().split(QRegExp("/")); - - m_request["msgid"] = msg.at(0); - m_request["callid"] = msg.at(1); - m_request["api"] = api_str_list[0]; - m_request["verb"] = api_str_list[1]; - m_request["parameter"] = msg.at(3); -} ResponseMessage::ResponseMessage(QJsonDocument content) { + m_jdoc = content; QJsonArray msg = content.array(); if (!msg[2].isObject()) { qWarning("Invalid appfw payload: no JSON object"); |