summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools/ivigenerator/templates_server_qtro_simulator/adapter.cpp.tpl8
-rw-r--r--src/tools/ivigenerator/templates_server_qtro_simulator/adapter.h.tpl8
-rw-r--r--tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/backend_qtro/backend_qtro.pro15
-rw-r--r--tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/org-example-echo-noannotation.pro9
-rw-r--r--tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/simulation_server_qtro/simulation_server_qtro.pro16
-rw-r--r--tests/auto/core/ivigenerator/projects/org-example-echo-qtro/org-example-echo-qtro.pro2
-rw-r--r--tests/auto/core/ivigenerator/projects/org-example-echo-qtro/simulation_server_qtro/simulation_server_qtro.pro16
7 files changed, 72 insertions, 2 deletions
diff --git a/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.cpp.tpl b/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.cpp.tpl
index dc6a699..fc4e68f 100644
--- a/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.cpp.tpl
+++ b/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.cpp.tpl
@@ -98,7 +98,13 @@ QStringList {{class}}::availableZones()
{% for property in interface.properties %}
{% if not property.readonly and not property.const and not property.type.is_model %}
-{{ivi.prop_setter(property, class, interface_zoned, model_interface = true)}}
+{% if interface_zoned %}
+{{ivi.prop_setter(property, class, zoned = true)}}
+{% else %}
+{% set type = property|return_type %}
+{# //repc doesn't generate proper const ref setters #}
+void {{class}}::{{property|setter_name}}({{type}} {{property}})
+{% endif %}
{
{% set parameters = property.name %}
{% if interface_zoned %}
diff --git a/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.h.tpl b/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.h.tpl
index 2e83960..f19d9f1 100644
--- a/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.h.tpl
+++ b/src/tools/ivigenerator/templates_server_qtro_simulator/adapter.h.tpl
@@ -98,7 +98,13 @@ public:
public Q_SLOTS:
{% for property in interface.properties %}
{% if not property.readonly and not property.const and not property.type.is_model %}
- {{ivi.prop_setter(property, zoned = interface_zoned, default_zone = true)}} override;
+{% if interface_zoned %}
+ {{ivi.prop_setter(property, zoned = true, default_zone = true)}} override;
+{% else %}
+{% set type = property|return_type %}
+{# //repc doesn't generate proper const ref setters #}
+ void {{property|setter_name}}({{type}} {{property}}) override;
+{% endif %}
{% endif %}
{% endfor %}
diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/backend_qtro/backend_qtro.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/backend_qtro/backend_qtro.pro
new file mode 100644
index 0000000..4f13551
--- /dev/null
+++ b/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/backend_qtro/backend_qtro.pro
@@ -0,0 +1,15 @@
+TEMPLATE=lib
+TARGET = $$qtLibraryTarget(echo_noannotation_qtro)
+LIBS += -L$$OUT_PWD/.. -l$$qtLibraryTarget(echo_noannotation_frontend)
+DESTDIR = ../qtivi
+
+CONFIG += warn_off ivigenerator plugin
+
+INCLUDEPATH += $$OUT_PWD/../frontend
+PLUGIN_TYPE = qtivi
+PLUGIN_CLASS_NAME = EchoPlugin
+
+QT += core ivicore
+
+QFACE_FORMAT = backend_qtro
+QFACE_SOURCES = ../../../org.example.echo.noannotation.qface
diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/org-example-echo-noannotation.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/org-example-echo-noannotation.pro
index 2446d17..ebadb50 100644
--- a/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/org-example-echo-noannotation.pro
+++ b/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/org-example-echo-noannotation.pro
@@ -8,3 +8,12 @@ SUBDIRS = frontend \
backend_simulator.depends = frontend
validator.depends = frontend
test.depends = frontend
+
+QT_FOR_CONFIG += ivicore
+qtConfig(remoteobjects): {
+ SUBDIRS += backend_qtro \
+ simulation_server_qtro \
+
+ backend_qtro.depends = frontend
+ simulation_server_qtro.depends = frontend
+}
diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/simulation_server_qtro/simulation_server_qtro.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/simulation_server_qtro/simulation_server_qtro.pro
new file mode 100644
index 0000000..fece593
--- /dev/null
+++ b/tests/auto/core/ivigenerator/projects/org-example-echo-noannotation/simulation_server_qtro/simulation_server_qtro.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = org-example-echo-noannotation-simulation-server
+QMAKE_PROJECT_NAME = $$TARGET
+LIBS += -L$$OUT_PWD/.. -l$$qtLibraryTarget(echo_noannotation_frontend)
+
+DESTDIR = ..
+
+CONFIG += c++11 ivigenerator
+CONFIG -= app_bundle
+
+INCLUDEPATH += $$OUT_PWD/../frontend
+
+QT += qml quick core ivicore
+
+QFACE_FORMAT = server_qtro_simulator
+QFACE_SOURCES = ../../../org.example.echo.noannotation.qface
diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/org-example-echo-qtro.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/org-example-echo-qtro.pro
index 0940541..9d56fcb 100644
--- a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/org-example-echo-qtro.pro
+++ b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/org-example-echo-qtro.pro
@@ -2,7 +2,9 @@ TEMPLATE = subdirs
SUBDIRS = frontend \
backend_qtro \
+ simulation_server_qtro \
server_qtro_test
backend_qtro.depends = frontend
server_qtro_test.depends = backend_qtro
+simulation_server_qtro.depends = frontend
diff --git a/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/simulation_server_qtro/simulation_server_qtro.pro b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/simulation_server_qtro/simulation_server_qtro.pro
new file mode 100644
index 0000000..75be13e
--- /dev/null
+++ b/tests/auto/core/ivigenerator/projects/org-example-echo-qtro/simulation_server_qtro/simulation_server_qtro.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = org-example-echo-qtro-simulation-server
+QMAKE_PROJECT_NAME = $$TARGET
+LIBS += -L$$OUT_PWD/.. -l$$qtLibraryTarget(echo_frontend)
+
+DESTDIR = ..
+
+CONFIG += c++11 ivigenerator
+CONFIG -= app_bundle
+
+INCLUDEPATH += $$OUT_PWD/../frontend
+
+QT += qml quick core ivicore
+
+QFACE_FORMAT = server_qtro_simulator
+QFACE_SOURCES = ../../../org.example.echo.qface