aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/ivigenerator/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/ivigenerator/templates')
-rw-r--r--src/tools/ivigenerator/templates/backend_qtro/backend.cpp.tpl4
-rw-r--r--src/tools/ivigenerator/templates/backend_simulator/plugin.cpp.tpl2
-rw-r--r--src/tools/ivigenerator/templates/common/backend_simulation.cpp.tpl2
-rw-r--r--src/tools/ivigenerator/templates/common/interface.rep.tpl4
-rw-r--r--src/tools/ivigenerator/templates/common/plugins.qmltypes.tpl2
-rw-r--r--src/tools/ivigenerator/templates/common/simulation.qmltypes.tpl2
-rw-r--r--src/tools/ivigenerator/templates/frontend.yaml8
-rw-r--r--src/tools/ivigenerator/templates/frontend/CMakeLists.txt.tpl4
-rw-r--r--src/tools/ivigenerator/templates/frontend/backendinterface.h.tpl4
-rw-r--r--src/tools/ivigenerator/templates/frontend/interface.h.tpl4
-rw-r--r--src/tools/ivigenerator/templates/frontend/interface_p.h.tpl2
-rw-r--r--src/tools/ivigenerator/templates/frontend/module.cpp.tpl4
-rw-r--r--src/tools/ivigenerator/templates/frontend/module.h.tpl4
-rw-r--r--src/tools/ivigenerator/templates/frontend/module.pri.tpl8
-rw-r--r--src/tools/ivigenerator/templates/frontend/modulefactory.cpp.tpl4
-rw-r--r--src/tools/ivigenerator/templates/frontend/modulefactory.h.tpl8
-rw-r--r--src/tools/ivigenerator/templates/frontend/struct.h.tpl4
-rw-r--r--src/tools/ivigenerator/templates/qmlplugin/plugin.cpp.tpl6
-rw-r--r--src/tools/ivigenerator/templates/server_qtro/core.cpp.tpl4
-rw-r--r--src/tools/ivigenerator/templates/server_qtro_simulator/core.cpp.tpl4
-rw-r--r--src/tools/ivigenerator/templates/server_qtro_simulator/main.cpp.tpl2
-rw-r--r--src/tools/ivigenerator/templates/test/tst_test.cpp.tpl2
22 files changed, 44 insertions, 44 deletions
diff --git a/src/tools/ivigenerator/templates/backend_qtro/backend.cpp.tpl b/src/tools/ivigenerator/templates/backend_qtro/backend.cpp.tpl
index b4a43c8..3aedb26 100644
--- a/src/tools/ivigenerator/templates/backend_qtro/backend.cpp.tpl
+++ b/src/tools/ivigenerator/templates/backend_qtro/backend.cpp.tpl
@@ -47,7 +47,7 @@
#include <QDebug>
#include <QSettings>
#include <QTimer>
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
Q_LOGGING_CATEGORY(qLcRO{{interface}}, "{{module|qml_type|lower}}.{{interface|lower}}backend.remoteobjects", QtInfoMsg)
@@ -146,7 +146,7 @@ void {{zone_class}}::emitCurrentState()
, m_synced(false)
{% endif %}
{
- {{module.module_name|upperfirst}}Module::registerTypes();
+ {{module.module_name|upperfirst}}::registerTypes();
{% if interface_zoned %}
auto zoneObject = new {{zone_class}}(QString(), this);
diff --git a/src/tools/ivigenerator/templates/backend_simulator/plugin.cpp.tpl b/src/tools/ivigenerator/templates/backend_simulator/plugin.cpp.tpl
index 22d1a58..cc2f831 100644
--- a/src/tools/ivigenerator/templates/backend_simulator/plugin.cpp.tpl
+++ b/src/tools/ivigenerator/templates/backend_simulator/plugin.cpp.tpl
@@ -73,7 +73,7 @@ extern {{class}}::InterfaceBuilder {{module.tags.config.interfaceBuilder}};
{% for interface in module.interfaces %}
auto {{interface}}Instance = new {{interface}}Backend(m_simulationEngine, this);
//Register the types for the SimulationEngine
- {{module.module_name|upperfirst}}Module::registerQmlTypes(QStringLiteral("{{module|qml_type}}.simulation"), {{module.majorVersion}}, {{module.minorVersion}});
+ {{module.module_name|upperfirst}}::registerQmlTypes(QStringLiteral("{{module|qml_type}}.simulation"), {{module.majorVersion}}, {{module.minorVersion}});
m_simulationEngine->registerSimulationInstance({{interface}}Instance, "{{module|qml_type}}.simulation", {{module.majorVersion}}, {{module.minorVersion}}, "{{interface}}Backend");
m_interfaces << {{interface}}Instance;
{% endfor %}
diff --git a/src/tools/ivigenerator/templates/common/backend_simulation.cpp.tpl b/src/tools/ivigenerator/templates/common/backend_simulation.cpp.tpl
index fdf597a..c4c5d64 100644
--- a/src/tools/ivigenerator/templates/common/backend_simulation.cpp.tpl
+++ b/src/tools/ivigenerator/templates/common/backend_simulation.cpp.tpl
@@ -128,7 +128,7 @@ QT_BEGIN_NAMESPACE
{% endif %}
{% endfor %}
- {{module.module_name|upperfirst}}Module::registerTypes();
+ {{module.module_name|upperfirst}}::registerTypes();
}
{{class}}::~{{class}}()
diff --git a/src/tools/ivigenerator/templates/common/interface.rep.tpl b/src/tools/ivigenerator/templates/common/interface.rep.tpl
index dd75f03..2b7cdf8 100644
--- a/src/tools/ivigenerator/templates/common/interface.rep.tpl
+++ b/src/tools/ivigenerator/templates/common/interface.rep.tpl
@@ -48,9 +48,9 @@
{% import 'common/qtivi_macros.j2' as ivi %}
{% set interface_zoned = interface.tags.config and interface.tags.config.zoned %}
{% if interface.module.tags.config.module %}
-#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}module.h>
+#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}.h>
{% else %}
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
{% endif %}
{% for inc in interface|struct_includes %}
{{inc}}
diff --git a/src/tools/ivigenerator/templates/common/plugins.qmltypes.tpl b/src/tools/ivigenerator/templates/common/plugins.qmltypes.tpl
index 5480e2e..9193f2b 100644
--- a/src/tools/ivigenerator/templates/common/plugins.qmltypes.tpl
+++ b/src/tools/ivigenerator/templates/common/plugins.qmltypes.tpl
@@ -104,7 +104,7 @@ Module {
{% endfor %}
Component {
- name: "{{module.module_name|upperfirst}}Module"
+ name: "{{module.module_name|upperfirst}}"
prototype: "QObject"
exports: ["{{module|qml_type}}/{{module_qml_name}} {{module.majorVersion}}.{{module.minorVersion}}"]
isCreatable: false
diff --git a/src/tools/ivigenerator/templates/common/simulation.qmltypes.tpl b/src/tools/ivigenerator/templates/common/simulation.qmltypes.tpl
index b8e79dc..2644f3a 100644
--- a/src/tools/ivigenerator/templates/common/simulation.qmltypes.tpl
+++ b/src/tools/ivigenerator/templates/common/simulation.qmltypes.tpl
@@ -220,7 +220,7 @@ Module {
{% endfor %}
Component {
- name: "{{module.module_name|upperfirst}}Module"
+ name: "{{module.module_name|upperfirst}}"
prototype: "QObject"
exports: ["{{module|qml_type}}.simulation/{{module_qml_name}} {{module.majorVersion}}.{{module.minorVersion}}"]
isCreatable: false
diff --git a/src/tools/ivigenerator/templates/frontend.yaml b/src/tools/ivigenerator/templates/frontend.yaml
index 7323d32..bdabab5 100644
--- a/src/tools/ivigenerator/templates/frontend.yaml
+++ b/src/tools/ivigenerator/templates/frontend.yaml
@@ -2,11 +2,11 @@ frontend:
module:
documents:
- '{{module.module_name|lower}}global.h': 'global.h.tpl'
- - '{{module.module_name|lower}}module.h': 'module.h.tpl'
- - '{{module.module_name|lower}}module.cpp': 'module.cpp.tpl'
+ - '{{module.module_name|lower}}.h': 'module.h.tpl'
+ - '{{module.module_name|lower}}.cpp': 'module.cpp.tpl'
- '{{module.module_name|lower}}module_enum.qdocinc': 'module_qml_enum.qdocinc.tpl'
- - '{{module.module_name|lower}}modulefactory.h': 'modulefactory.h.tpl'
- - '{{module.module_name|lower}}modulefactory.cpp': 'modulefactory.cpp.tpl'
+ - '{{module.module_name|lower}}factory.h': 'modulefactory.h.tpl'
+ - '{{module.module_name|lower}}factory.cpp': 'modulefactory.cpp.tpl'
- '{{srcBase|lower}}.pri': 'module.pri.tpl'
- '{{srcBase|lower}}.cmake': 'CMakeLists.txt.tpl'
- 'qml/{{module|qml_type|replace(".", "/")}}/plugins.qmltypes': 'common/plugins.qmltypes.tpl'
diff --git a/src/tools/ivigenerator/templates/frontend/CMakeLists.txt.tpl b/src/tools/ivigenerator/templates/frontend/CMakeLists.txt.tpl
index 4f39367..347b288 100644
--- a/src/tools/ivigenerator/templates/frontend/CMakeLists.txt.tpl
+++ b/src/tools/ivigenerator/templates/frontend/CMakeLists.txt.tpl
@@ -9,6 +9,6 @@ target_sources(${CURRENT_TARGET}
{% for struct in module.structs %}
{{struct|lower}}.cpp
{% endfor %}
- {{module.module_name|lower}}module.cpp
- {{module.module_name|lower}}modulefactory.cpp
+ {{module.module_name|lower}}.cpp
+ {{module.module_name|lower}}factory.cpp
)
diff --git a/src/tools/ivigenerator/templates/frontend/backendinterface.h.tpl b/src/tools/ivigenerator/templates/frontend/backendinterface.h.tpl
index 2eb9b97..699f283 100644
--- a/src/tools/ivigenerator/templates/frontend/backendinterface.h.tpl
+++ b/src/tools/ivigenerator/templates/frontend/backendinterface.h.tpl
@@ -51,9 +51,9 @@
#define {{oncedefine}}
{% if interface.module.tags.config.module %}
-#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}module.h>
+#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}.h>
{% else %}
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
{% endif %}
{% for inc in interface|struct_includes %}
diff --git a/src/tools/ivigenerator/templates/frontend/interface.h.tpl b/src/tools/ivigenerator/templates/frontend/interface.h.tpl
index fd7d0ef..12b0389 100644
--- a/src/tools/ivigenerator/templates/frontend/interface.h.tpl
+++ b/src/tools/ivigenerator/templates/frontend/interface.h.tpl
@@ -52,9 +52,9 @@
#define {{oncedefine}}
{% if interface.module.tags.config.module %}
-#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}module.h>
+#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}.h>
{% else %}
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
{% endif %}
{% for inc in interface|struct_includes %}
diff --git a/src/tools/ivigenerator/templates/frontend/interface_p.h.tpl b/src/tools/ivigenerator/templates/frontend/interface_p.h.tpl
index 0a68644..a8b68a5 100644
--- a/src/tools/ivigenerator/templates/frontend/interface_p.h.tpl
+++ b/src/tools/ivigenerator/templates/frontend/interface_p.h.tpl
@@ -60,7 +60,7 @@
// We mean it.
//
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
{% if module.tags.config.disablePrivateIVI %}
#include <QObject>
diff --git a/src/tools/ivigenerator/templates/frontend/module.cpp.tpl b/src/tools/ivigenerator/templates/frontend/module.cpp.tpl
index a99eaa6..847e7dd 100644
--- a/src/tools/ivigenerator/templates/frontend/module.cpp.tpl
+++ b/src/tools/ivigenerator/templates/frontend/module.cpp.tpl
@@ -37,7 +37,7 @@
#
# SPDX-License-Identifier: LGPL-3.0
#}
-{% set class = '{0}Module'.format(module.module_name|upperfirst) %}
+{% set class = '{0}'.format(module.module_name|upperfirst) %}
{% set qml_name = (module|qml_type).split('.')[-1]|upperfirst %}
{% include 'common/generated_comment.cpp.tpl' %}
{% import 'common/qtivi_macros.j2' as ivi %}
@@ -126,7 +126,7 @@ void {{class}}::registerTypes()
{% set name = import.split(' ')[0] %}
{% for mod in system.modules %}
{% if mod.name == name %}
- {{mod.module_name|upperfirst}}Module::registerTypes();
+ {{mod.module_name|upperfirst}}::registerTypes();
{% endif %}
{% endfor %}
{% endfor %}
diff --git a/src/tools/ivigenerator/templates/frontend/module.h.tpl b/src/tools/ivigenerator/templates/frontend/module.h.tpl
index 859cf51..017a52e 100644
--- a/src/tools/ivigenerator/templates/frontend/module.h.tpl
+++ b/src/tools/ivigenerator/templates/frontend/module.h.tpl
@@ -38,7 +38,7 @@
# SPDX-License-Identifier: LGPL-3.0
#}
{% set exportsymbol = 'Q_{0}_EXPORT'.format(module|upper|replace('.', '_')) %}
-{% set class = '{0}Module'.format(module.module_name|upperfirst) %}
+{% set class = '{0}'.format(module.module_name|upperfirst) %}
{% set oncedefine = '{0}_H_'.format(class|upper) %}
{% include 'common/generated_comment.cpp.tpl' %}
@@ -59,7 +59,7 @@
{% set name = import.split(' ')[0] %}
{% for mod in system.modules %}
{% if mod.name == name %}
-#include <{{mod.module_name|lower}}module.h>
+#include <{{mod.module_name|lower}}.h>
{% endif %}
{% endfor %}
{% endfor %}
diff --git a/src/tools/ivigenerator/templates/frontend/module.pri.tpl b/src/tools/ivigenerator/templates/frontend/module.pri.tpl
index beb9da8..9667de9 100644
--- a/src/tools/ivigenerator/templates/frontend/module.pri.tpl
+++ b/src/tools/ivigenerator/templates/frontend/module.pri.tpl
@@ -54,8 +54,8 @@ HEADERS += \
{% for struct in module.structs %}
$$PWD/{{struct|lower}}.h \
{% endfor %}
- $$PWD/{{module.module_name|lower}}module.h \
- $$PWD/{{module.module_name|lower}}modulefactory.h \
+ $$PWD/{{module.module_name|lower}}.h \
+ $$PWD/{{module.module_name|lower}}factory.h \
$$PWD/{{module.module_name|lower}}global.h
SOURCES += \
@@ -66,5 +66,5 @@ SOURCES += \
{% for struct in module.structs %}
$$PWD/{{struct|lower}}.cpp \
{% endfor %}
- $$PWD/{{module.module_name|lower}}module.cpp \
- $$PWD/{{module.module_name|lower}}modulefactory.cpp
+ $$PWD/{{module.module_name|lower}}.cpp \
+ $$PWD/{{module.module_name|lower}}factory.cpp
diff --git a/src/tools/ivigenerator/templates/frontend/modulefactory.cpp.tpl b/src/tools/ivigenerator/templates/frontend/modulefactory.cpp.tpl
index dcffada..6eef8be 100644
--- a/src/tools/ivigenerator/templates/frontend/modulefactory.cpp.tpl
+++ b/src/tools/ivigenerator/templates/frontend/modulefactory.cpp.tpl
@@ -37,7 +37,7 @@
#
# SPDX-License-Identifier: LGPL-3.0
#}
-{% set class = '{0}ModuleFactory'.format(module.module_name|upperfirst) %}
+{% set class = '{0}Factory'.format(module.module_name|upperfirst) %}
{% set qml_name = (module|qml_type).split('.')[-1]|upperfirst %}
{% include 'common/generated_comment.cpp.tpl' %}
@@ -67,7 +67,7 @@ QT_BEGIN_NAMESPACE
{% endfor %}
*/
{{class}}::{{class}}(QObject *parent)
- : {{module.module_name|upperfirst}}Module(parent)
+ : {{module.module_name|upperfirst}}(parent)
{
}
diff --git a/src/tools/ivigenerator/templates/frontend/modulefactory.h.tpl b/src/tools/ivigenerator/templates/frontend/modulefactory.h.tpl
index 306b728..612350e 100644
--- a/src/tools/ivigenerator/templates/frontend/modulefactory.h.tpl
+++ b/src/tools/ivigenerator/templates/frontend/modulefactory.h.tpl
@@ -38,7 +38,7 @@
# SPDX-License-Identifier: LGPL-3.0
#}
{% set exportsymbol = 'Q_{0}_EXPORT'.format(module|upper|replace('.', '_')) %}
-{% set class = '{0}ModuleFactory'.format(module.module_name|upperfirst) %}
+{% set class = '{0}Factory'.format(module.module_name|upperfirst) %}
{% set oncedefine = '{0}_H_'.format(class|upper) %}
{% include 'common/generated_comment.cpp.tpl' %}
@@ -46,9 +46,9 @@
#define {{oncedefine}}
{% if module.tags.config.module %}
-#include <{{module.tags.config.module}}/{{module.module_name|lower}}module.h>
+#include <{{module.tags.config.module}}/{{module.module_name|lower}}.h>
{% else %}
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
{% endif %}
#include <QObject>
@@ -58,7 +58,7 @@
QT_BEGIN_NAMESPACE
-class {{exportsymbol}} {{class}} : public {{module.module_name|upperfirst}}Module
+class {{exportsymbol}} {{class}} : public {{module.module_name|upperfirst}}
{
Q_OBJECT
diff --git a/src/tools/ivigenerator/templates/frontend/struct.h.tpl b/src/tools/ivigenerator/templates/frontend/struct.h.tpl
index 9405c60..caaf65c 100644
--- a/src/tools/ivigenerator/templates/frontend/struct.h.tpl
+++ b/src/tools/ivigenerator/templates/frontend/struct.h.tpl
@@ -48,9 +48,9 @@
#define {{oncedefine}}
{% if module.tags.config.module %}
-#include <{{module.tags.config.module}}/{{module.module_name|lower}}module.h>
+#include <{{module.tags.config.module}}/{{module.module_name|lower}}.h>
{% else %}
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
{% endif %}
{% for inc in struct|struct_includes %}
{{inc}}
diff --git a/src/tools/ivigenerator/templates/qmlplugin/plugin.cpp.tpl b/src/tools/ivigenerator/templates/qmlplugin/plugin.cpp.tpl
index 0d5a492..bbd8acd 100644
--- a/src/tools/ivigenerator/templates/qmlplugin/plugin.cpp.tpl
+++ b/src/tools/ivigenerator/templates/qmlplugin/plugin.cpp.tpl
@@ -48,9 +48,9 @@
#include <qqml.h>
{% if module.tags.config.module %}
-#include <{{module.tags.config.module}}/{{module.module_name|lower}}modulefactory.h>
+#include <{{module.tags.config.module}}/{{module.module_name|lower}}factory.h>
{% else %}
-#include "{{module.module_name|lower}}modulefactory.h"
+#include "{{module.module_name|lower}}factory.h"
{% endif %}
QT_BEGIN_NAMESPACE
@@ -65,7 +65,7 @@ public:
Q_ASSERT(QLatin1String(uri) == QLatin1String("{{module|qml_type}}"));
Q_UNUSED(uri);
- {{module_name}}ModuleFactory::registerQmlTypes();
+ {{module_name}}Factory::registerQmlTypes();
}
};
diff --git a/src/tools/ivigenerator/templates/server_qtro/core.cpp.tpl b/src/tools/ivigenerator/templates/server_qtro/core.cpp.tpl
index 1c3450a..f7c576a 100644
--- a/src/tools/ivigenerator/templates/server_qtro/core.cpp.tpl
+++ b/src/tools/ivigenerator/templates/server_qtro/core.cpp.tpl
@@ -42,7 +42,7 @@
#include "{{class|lower}}.h"
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
#include <QCoreApplication>
#include <QSettings>
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
void {{class}}::init()
{
- {{module.module_name|upperfirst}}Module::registerTypes();
+ {{module.module_name|upperfirst}}::registerTypes();
QString configPath(QStringLiteral("./server.conf"));
if (qEnvironmentVariableIsSet("SERVER_CONF_PATH"))
configPath = QString::fromLocal8Bit(qgetenv("SERVER_CONF_PATH"));
diff --git a/src/tools/ivigenerator/templates/server_qtro_simulator/core.cpp.tpl b/src/tools/ivigenerator/templates/server_qtro_simulator/core.cpp.tpl
index a792bd8..d08945f 100644
--- a/src/tools/ivigenerator/templates/server_qtro_simulator/core.cpp.tpl
+++ b/src/tools/ivigenerator/templates/server_qtro_simulator/core.cpp.tpl
@@ -41,7 +41,7 @@
#include "{{class|lower}}.h"
-#include "{{module.module_name|lower}}module.h"
+#include "{{module.module_name|lower}}.h"
#include <QCoreApplication>
#include <QSettings>
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
void {{class}}::init()
{
- {{module.module_name|upperfirst}}Module::registerTypes();
+ {{module.module_name|upperfirst}}::registerTypes();
QString configPath(QStringLiteral("./server.conf"));
if (qEnvironmentVariableIsSet("SERVER_CONF_PATH"))
configPath = QString::fromLocal8Bit(qgetenv("SERVER_CONF_PATH"));
diff --git a/src/tools/ivigenerator/templates/server_qtro_simulator/main.cpp.tpl b/src/tools/ivigenerator/templates/server_qtro_simulator/main.cpp.tpl
index 8da233a..82c9383 100644
--- a/src/tools/ivigenerator/templates/server_qtro_simulator/main.cpp.tpl
+++ b/src/tools/ivigenerator/templates/server_qtro_simulator/main.cpp.tpl
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
{% for interface in module.interfaces %}
auto {{interface|lowerfirst}}Instance = new {{interface}}Backend(simulationEngine);
//Register the types for the SimulationEngine
- {{module.module_name|upperfirst}}Module::registerQmlTypes(QStringLiteral("{{module|qml_type}}.simulation"), {{module.majorVersion}}, {{module.minorVersion}});
+ {{module.module_name|upperfirst}}::registerQmlTypes(QStringLiteral("{{module|qml_type}}.simulation"), {{module.majorVersion}}, {{module.minorVersion}});
simulationEngine->registerSimulationInstance({{interface|lowerfirst}}Instance, "{{module|qml_type}}.simulation", {{module.majorVersion}}, {{module.minorVersion}}, "{{interface}}Backend");
{% endfor %}
{% if module.tags.config_simulator and module.tags.config_simulator.simulationFile %}
diff --git a/src/tools/ivigenerator/templates/test/tst_test.cpp.tpl b/src/tools/ivigenerator/templates/test/tst_test.cpp.tpl
index 9768e8e..8ac56ef 100644
--- a/src/tools/ivigenerator/templates/test/tst_test.cpp.tpl
+++ b/src/tools/ivigenerator/templates/test/tst_test.cpp.tpl
@@ -260,7 +260,7 @@ private:
: QObject()
{
QCoreApplication::setLibraryPaths(QStringList());
- {{module.module_name|upperfirst}}Module::registerTypes();
+ {{module.module_name|upperfirst}}::registerTypes();
manager = QIviServiceManager::instance();
}