aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2018-06-05 14:49:41 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2018-06-08 07:47:14 +0000
commit472e09f1c5139c4a2504e52e1c787d46e411fe99 (patch)
tree42692be9a046c7df85e9f8f9031fd924b9b6932d
parente38c15a45a70033717cd7a01304d7b267b9b90e1 (diff)
Initialize all properties in the vehiclefunction-controller
This is actually a fix for the control_panel template and makes sure all properties are initialized correctly. Otherwise we might run into situations where an uninitialized value is returned to QML and from there also send the backend. Task-number: AUTOSUITE-523 Change-Id: I85671cd378dcd457c5038cbcb1735315d6da3a5e Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r--src/tools/ivigenerator/templates_control_panel/interface.cpp.tpl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/ivigenerator/templates_control_panel/interface.cpp.tpl b/src/tools/ivigenerator/templates_control_panel/interface.cpp.tpl
index db89c84..afb5f5d 100644
--- a/src/tools/ivigenerator/templates_control_panel/interface.cpp.tpl
+++ b/src/tools/ivigenerator/templates_control_panel/interface.cpp.tpl
@@ -56,6 +56,9 @@ QT_BEGIN_NAMESPACE
{% if interface.tags.config.zoned %}
{{class}}::{{class}}(const QString &zone, QObject *parent)
: QObject(parent)
+ {% for property in interface.properties %}
+ , m_{{ property }}({{property|default_value}})
+ {% endfor %}
, m_currentZone(zone)
{
if (!zone.isEmpty()) {