The code currently assumes that the received data is valid:
- any received message contains a JSON object:
BasicQWebChannel<Json>::message_handler
- that any message object contains the fields required by QtWebChannel: e.g.
data["type"] instead of data.value("type", "")
- callbacks are executed without checking if they actually exist:
BasicQWebChannel<Json>::handle_response()
- maybe / probably more I don't see now: e.g. are the
.template get<int>() calls safe if the element is not convertible to integer?
The code currently assumes that the received data is valid:
BasicQWebChannel<Json>::message_handlerdata["type"]instead ofdata.value("type", "")BasicQWebChannel<Json>::handle_response().template get<int>()calls safe if the element is not convertible to integer?