Skip to content

Commit

Permalink
IPC: stop using streaming operators
Browse files Browse the repository at this point in the history
  • Loading branch information
jacky309 committed Sep 17, 2018
1 parent ed1939b commit 76e7b32
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions codegen/facelift/templates/ServiceIPC.template.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class {{classExport}} {{interface}}IPCAdapter: public facelift::IPCServiceAdapte
if (member == "set{{property.name}}") {
{% if (not property.type.is_interface) %}
{{property.cppType}} value;
requestMessage >> value;
deserializeValue(requestMessage, value);
theService->set{{property.name}}(value);
serializePropertyValues(replyMessage);
{% else %}
Expand Down Expand Up @@ -244,10 +244,10 @@ class {{classExport}} {{interface}}IPCAdapter: public facelift::IPCServiceAdapte
{% for property in interface.properties %}
{% if property.type.is_interface %}

msg << m_{{property.name}}.objectPath();
serializeValue(msg, m_{{property.name}}.objectPath());

{% elif property.type.is_model %}
msg << theService->{{property.name}}().size();
serializeValue(msg, theService->{{property.name}}().size());
{% else %}
serializeValue(msg, theService->{{property.name}}());
{% endif %}
Expand Down Expand Up @@ -317,12 +317,12 @@ class {{classExport}} {{interface}}IPCProxy : public facelift::IPCProxy<{{interf

{% if property.type.is_interface %}
QString {{property.name}}_objectPath;
msg >> {{property.name}}_objectPath;
deserializeValue(msg, {{property.name}}_objectPath);
m_{{property.name}}Proxy.update({{property.name}}_objectPath);
m_{{property.name}} = m_{{property.name}}Proxy.getValue();
{% elif property.type.is_model %}
int {{property.name}}Size;
msg >> {{property.name}}Size;
deserializeValue(msg, {{property.name}}Size);
m_{{property.name}}.beginResetModel();
m_{{property.name}}.reset({{property.name}}Size, std::bind(&{{interface}}IPCProxy::{{property.name}}Data, this, std::placeholders::_1));
m_{{property.name}}.endResetModel();
Expand Down Expand Up @@ -374,11 +374,11 @@ class {{classExport}} {{interface}}IPCProxy : public facelift::IPCProxy<{{interf
{% if operation.isAsync %}
if (signalName == "{{operation.name}}AsyncCallResult") {
facelift::ASyncRequestID id;
msg >> id;
deserializeValue(msg, id);
if (m_{{operation.name}}Requests.contains(id)) {
{% if operation.hasReturnValue %}
{{operation.cppType}} returnValue;
msg >> returnValue;
deserializeValue(msg, returnValue);
m_{{operation.name}}Requests[id](returnValue);
{% else %}
m_{{operation.name}}Requests[id]();
Expand Down

0 comments on commit 76e7b32

Please sign in to comment.