Commit de51d3d6 authored by Wouter's avatar Wouter

Various template cleanups

parent 4383baa5
......@@ -20,7 +20,7 @@ class AbstractWrapper {
/**
* Default constructor
*/
explicit AbstractWrapper() {};
AbstractWrapper() {};
/**
* Initialize the value.
......
......@@ -26,14 +26,14 @@
LoadOwnData(data);
}
void {{ class.namespaces|join:"::" }}::{{ class.className }}::Load(const QVariantMap &data) {
void {{ class.fullName }}::Load(const QVariantMap &data) {
{% for item in class.inheritance %}{% if item.type.isIntrospected %}
{{ item.type.fullName }}::Load(data);
{% endif %}{% endfor %}
LoadOwnData(data);
}
void {{ class.namespaces|join:"::" }}::{{ class.className }}::LoadOwnData(const QVariantMap &data) {
void {{ class.fullName }}::LoadOwnData(const QVariantMap &data) {
{% for field in class.fields %}
if (data.contains("{{ field.originalName }}")) {
{% evalto src %}data.value("{{ field.originalName }}"){% evaltosplit %}
......@@ -47,7 +47,7 @@
{% case "Method" %}
{% if not member.isInline %}{% if not member.isPureVirtual %}
{{ member.returnType.signature }} {{ class.namespaces|join:"::" }}::{{ class.className }}::{{ 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 }}
}
......
......@@ -15,7 +15,7 @@
//
// Generated from: "{{ project.name }}", version {{ project.version }}
// at: {{ project.date|date:"yyyy-MM-dd hh:mm:ss" }}
//
// for: {{ class.metaType }} {{ class.fullName }}
{% endblock %}
{% block guardopen %}
......
......@@ -2,12 +2,13 @@
{% filter singlewhitelines %}
{% block license %}
/**
/*
* Copyright notice
*
*/
{% endblock %}
{% block warning %}
// AUTO-GENERATED BY QJSONINTROSPECT!
// DO NOT MODIFY; YOUR CHANGES WILL BE OVERWRITTEN
//
......@@ -15,7 +16,10 @@
//
// Generated from: "{{ project.name }}", version {{ project.version }}
// at: {{ project.date|date:"yyyy-MM-dd hh:mm:ss" }}
//
// for: {{ class.metaType }} {{ class.fullName }}
{% endblock %}
{% block includes %}
#include "{{ class.filename }}"
......
......@@ -10,7 +10,6 @@
{% case "type" %}
// Don't know how to read {{ type.className }} for {{ dst }}
{% case "class" %}
// CLASS
{{ dst }} = {% if type.isPointer %}new {% endif %}{{ type.type.fullName }}({{ src }}.toMap(){% if class.isQObject and type.type.isQObject %}, this{% endif %});
{% case "array" %}
{% with type.type.itemType as itemType %}
......
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