Commit a929b5d0 authored by Wouter's avatar Wouter

Template clean-ups

Parameter/initializers on new lines (to avoid very long lines), removing
some comments too
parent 6739cba1
......@@ -7,8 +7,10 @@
{% switch member.memberKind %}
{% default %}
{% case "Constructor" %}
{% evalto initializers %}{% for item in member.initializers %}{% if forloop.first %}:{% else %},{% endif %} {{ item.member }}({{ item.parameters }}){% endfor %}{% evaltosplit %}
{% evalto params %}{% for param in member.parameters %}{% if not forloop.first %}, {% endif %}{{ param.type.signature }} {{ param.name }}{% endfor %}{% evaltosplit %}
{% evalto initializers %}{% for item in member.initializers %}{% if forloop.first %}:{% else %},
{% endif %} {{ item.member }}({{ item.parameters }}){% endfor %}{% evaltosplit %}
{% evalto params %}{% for param in member.parameters %}{% if not forloop.first %},
{% endif %}{{ param.type.signature }} {{ param.name }}{% endfor %}{% evaltosplit %}
{{ class.fullName }}::{{ member.name }}({{ params }})
{{ initializers }}
{
......@@ -87,7 +89,8 @@
{% case "RpcMethod" %}
{% if not member.isInline %}{% if not member.isPureVirtual %}
{% ifequal member.returnType.type.fullName "void" %}void{% else %}QFuture<{{ member.returnType.signature }}>{% endifequal %} {{ class.fullName }}::{{ member.name }}({% for param in member.parameters %}{% if not forloop.first %}, {% endif %}{{ param.type.signature }} {{ param.name }}{% endfor %}){% if member.isConst %} const{% endif %} {
{% ifequal member.returnType.type.fullName "void" %}void{% else %}QFuture<{{ member.returnType.signature }}>{% endifequal %} {{ class.fullName }}::{{ member.name }}({% for param in member.parameters %}{% if not forloop.first %},
{% endif %}{{ param.type.signature }} {{ param.name }}{% endfor %}){% if member.isConst %} const{% endif %} {
QVariantMap _rpcParameters;
{% for param in member.parameters %}
// {{ param.type.type.metaType }}
......@@ -123,7 +126,8 @@
{% case "Method" %}
{% if not member.isInline %}{% if not member.isPureVirtual %}
{{ member.returnType.signature }} {{ class.fullName }}::{{ member.name }}({% for param in member.parameters %}{% if not forloop.first %}, {% endif %}{{ param.type.signature }} {{ param.name }}{% endfor %}){% if member.isConst %} const{% endif %} {
{{ member.returnType.signature }} {{ class.fullName }}::{{ member.name }}({% for param in member.parameters %}{% if not forloop.first %},
{% endif %}{{ param.type.signature }} {{ param.name }}{% endfor %}){% if member.isConst %} const{% endif %} {
{{ member.body }}
}
......
......@@ -8,14 +8,13 @@
*/
{% filter trim %}
// MEMBER ({{ member.memberKind }}) {{ class.fullName }}::{{ member.name }}
{% switch member.memberKind %}
{% default %}
// SKIPPING {{ class.fullName }}::{{ member.name }} -- unknown kind {{ member.memberKind }}
{% case "Constructor" %}
{% filter indent:0 %}{# Prevent indentation for readability from actual indentation #}
{% if member.isExplicit %}explicit {% endif %}{{ member.name }}({% for param in member.parameters %}{% if not forloop.first %}, {% endif %}{{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %});
{% if member.isExplicit %}explicit {% endif %}{{ member.name }}({% for param in member.parameters %}{% if not forloop.first %},
{% endif %}{{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %});
/**
* Load {{ member.name }} from variant data.
......@@ -23,18 +22,21 @@
* {{ member.documentation|wordwrap:70|indent:" * " }}
{% endif %}
*/
{% if member.isExplicit %}explicit {% endif %}{{ member.name }}(const QVariantMap &data{% for param in member.parameters %}, {{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %});
{% if member.isExplicit %}explicit {% endif %}{{ member.name }}(const QVariantMap &data{% for param in member.parameters %},
{{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %});
{% endfilter %}
{% case "Method" "Notification" %}
{% filter indent:0 %}
{% if member.isInline %}inline {% endif %}{% if member.isStatic %}static {% endif %}{% if member.isVirtual %}virtual {% endif %}{{ member.returnType.signature }} {{ member.name }}({% for param in member.parameters %}{% if not forloop.first %}, {% endif %}{{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %}){% if member.isConst %} const{% endif %}{% if member.isPureVirtual %} = 0{% endif %}{% if member.isInline %} {
{% if member.isInline %}inline {% endif %}{% if member.isStatic %}static {% endif %}{% if member.isVirtual %}virtual {% endif %}{{ member.returnType.signature }} {{ member.name }}({% for param in member.parameters %}{% if not forloop.first %},
{% endif %}{{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %}){% if member.isConst %} const{% endif %}{% if member.isPureVirtual %} = 0{% endif %}{% if member.isInline %} {
{{ member.body }}
}{% endif %};
{% endfilter %}
{% case "RpcMethod" %}
{% filter indent:0 %}
{% if member.isInline %}inline {% endif %}{% if member.isStatic %}static {% endif %}{% if member.isVirtual %}virtual {% endif %}{% ifequal member.returnType.type.fullName "void" %}void{% else %}QFuture<{{ member.returnType.signature }}>{% endifequal %} {{ member.name }}({% for param in member.parameters %}{% if not forloop.first %}, {% endif %}{{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %}){% if member.isConst %} const{% endif %}{% if member.isPureVirtual %} = 0{% endif %}{% if member.isInline %} {
{% if member.isInline %}inline {% endif %}{% if member.isStatic %}static {% endif %}{% if member.isVirtual %}virtual {% endif %}{% ifequal member.returnType.type.fullName "void" %}void{% else %}QFuture<{{ member.returnType.signature }}>{% endifequal %} {{ member.name }}({% for param in member.parameters %}{% if not forloop.first %},
{% endif %}{{ param.type.signature }} {{ param.name }}{% if param.defaultValue %} = {{ param.defaultValue }}{% endif %}{% endfor %}){% if member.isConst %} const{% endif %}{% if member.isPureVirtual %} = 0{% endif %}{% if member.isInline %} {
{{ member.body }}
}{% endif %};
{% endfilter %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment