summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2018-04-04 12:08:00 +0200
committerAntti Hölttä <ahoelttae@luxoft.com>2018-04-12 07:32:28 +0000
commit8658258f2f8d8dac3327a870573dc046029b74bc (patch)
treeb9af6ffd5ecf04b4896811e3b1b904d9ad9b0a92 /src
parent741ed2546671394cfe28f9240e71b422e06609db (diff)
downloadqtivi-8658258f2f8d8dac3327a870573dc046029b74bc.tar.gz
ivigenerator: Generate correct public headers when building a qt module
When building a qt module all public headers need to use the module name in their include statements. This is done by using the QFACE_MODULE_NAME qmake variable, which is now mandatory when generating a qt module from a qface file Change-Id: I31232a48a3c978552a27f1d82f3eacba480427b2 Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
Diffstat (limited to 'src')
-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/module.h.tpl4
-rw-r--r--src/tools/ivigenerator/templates_frontend/modulefactory.h.tpl4
-rw-r--r--src/tools/ivigenerator/templates_frontend/struct.h.tpl4
5 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/ivigenerator/templates_frontend/backendinterface.h.tpl b/src/tools/ivigenerator/templates_frontend/backendinterface.h.tpl
index 55874ee..d06162f 100644
--- a/src/tools/ivigenerator/templates_frontend/backendinterface.h.tpl
+++ b/src/tools/ivigenerator/templates_frontend/backendinterface.h.tpl
@@ -44,7 +44,11 @@
#ifndef {{oncedefine}}
#define {{oncedefine}}
+{% if interface.module.tags.config.module %}
+#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}module.h>
+{% else %}
#include "{{module.module_name|lower}}module.h"
+{% endif %}
{% for inc in interface|struct_includes %}
{{inc}}
diff --git a/src/tools/ivigenerator/templates_frontend/interface.h.tpl b/src/tools/ivigenerator/templates_frontend/interface.h.tpl
index 9786210..0c33c65 100644
--- a/src/tools/ivigenerator/templates_frontend/interface.h.tpl
+++ b/src/tools/ivigenerator/templates_frontend/interface.h.tpl
@@ -44,7 +44,11 @@
#ifndef {{oncedefine}}
#define {{oncedefine}}
+{% if interface.module.tags.config.module %}
+#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}module.h>
+{% else %}
#include "{{module.module_name|lower}}module.h"
+{% endif %}
{% for inc in interface|struct_includes %}
{{inc}}
diff --git a/src/tools/ivigenerator/templates_frontend/module.h.tpl b/src/tools/ivigenerator/templates_frontend/module.h.tpl
index 01f7f51..aa10866 100644
--- a/src/tools/ivigenerator/templates_frontend/module.h.tpl
+++ b/src/tools/ivigenerator/templates_frontend/module.h.tpl
@@ -45,7 +45,11 @@
#ifndef {{oncedefine}}
#define {{oncedefine}}
+{% if module.tags.config.module %}
+#include <{{module.tags.config.module}}/{{module.module_name|lower}}global.h>
+{% else %}
#include "{{module.module_name|lower}}global.h"
+{% endif %}
#include <QObject>
QT_BEGIN_NAMESPACE
diff --git a/src/tools/ivigenerator/templates_frontend/modulefactory.h.tpl b/src/tools/ivigenerator/templates_frontend/modulefactory.h.tpl
index bbc6974..c805956 100644
--- a/src/tools/ivigenerator/templates_frontend/modulefactory.h.tpl
+++ b/src/tools/ivigenerator/templates_frontend/modulefactory.h.tpl
@@ -45,7 +45,11 @@
#ifndef {{oncedefine}}
#define {{oncedefine}}
+{% if module.tags.config.module %}
+#include <{{module.tags.config.module}}/{{module.module_name|lower}}module.h>
+{% else %}
#include "{{module.module_name|lower}}module.h"
+{% endif %}
#include <QObject>
{% for struct in module.structs %}
diff --git a/src/tools/ivigenerator/templates_frontend/struct.h.tpl b/src/tools/ivigenerator/templates_frontend/struct.h.tpl
index 7a6b3d7..ed97d4f 100644
--- a/src/tools/ivigenerator/templates_frontend/struct.h.tpl
+++ b/src/tools/ivigenerator/templates_frontend/struct.h.tpl
@@ -45,7 +45,11 @@
#ifndef {{oncedefine}}
#define {{oncedefine}}
+{% if interface.module.tags.config.module %}
+#include <{{interface.module.tags.config.module}}/{{module.module_name|lower}}module.h>
+{% else %}
#include "{{module.module_name|lower}}module.h"
+{% endif %}
{% for inc in struct|struct_includes %}
{{inc}}
{% endfor %}