summaryrefslogtreecommitdiff
path: root/src/ivicore
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2019-10-07 16:38:48 +0200
committerDominik Holland <dominik.holland@qt.io>2019-10-29 17:26:28 +0100
commit25ba2939cace6bfbc065f3c8ea8cfe6d72eb5c17 (patch)
treed2475a26e8ed1332ee9abd83f70b17d05f52234a /src/ivicore
parent25b1d344d1f5b5fe791f9c9893adfc59a8db60e5 (diff)
downloadqtivi-25ba2939cace6bfbc065f3c8ea8cfe6d72eb5c17.tar.gz
ivigenerator: Add support to import other modules
When importing another module from within a QFace file, the generator now searches within the QFace import path. If this module is found, the information is then used to generate code that includes types from this module. The QFace import path can be set in the autogenerator similar to qmlscene by using the -I option; in qmake it can be set using QFACE_IMPORT_PATH. The generator makes sure to generate correct code, but the developer still needs to setup the .pro files correctly to add the imported module to the INCLUDEPATH and also link to the generated library. Fixes: AUTOSUITE-1158 Change-Id: I0e9fa714d4c893a4bf17c5f7db34c62d84932c94 Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'src/ivicore')
-rw-r--r--src/ivicore/doc/src/ivigenerator/generator-usage.qdoc7
-rw-r--r--src/ivicore/doc/src/ivigenerator/ivigenerator.qdoc1
-rw-r--r--src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc4
3 files changed, 11 insertions, 1 deletions
diff --git a/src/ivicore/doc/src/ivigenerator/generator-usage.qdoc b/src/ivicore/doc/src/ivigenerator/generator-usage.qdoc
index ba45323..287dc99 100644
--- a/src/ivicore/doc/src/ivigenerator/generator-usage.qdoc
+++ b/src/ivicore/doc/src/ivigenerator/generator-usage.qdoc
@@ -77,6 +77,13 @@
overrides the previously set value. This option can be used multiple times. For
more information, see \l{merge-annotations}{Merge Annotations}.
\row
+ \target import-option
+ \li -I, --import <import-path>
+ \li Adds the given path to the list of import paths. All directories in this list are
+ scanned recursively for QFace files. The QFace files found are then used to resolve
+ the information required when importing a module; this is similar to how C++ include
+ paths work.
+ \row
\li source
\li Path or paths to the IDL source files. If there are multiple entries, each one is
handled. If a directory path is provided, it's scanned for IDL files.
diff --git a/src/ivicore/doc/src/ivigenerator/ivigenerator.qdoc b/src/ivicore/doc/src/ivigenerator/ivigenerator.qdoc
index 2d62ed5..5ff1c97 100644
--- a/src/ivicore/doc/src/ivigenerator/ivigenerator.qdoc
+++ b/src/ivicore/doc/src/ivigenerator/ivigenerator.qdoc
@@ -50,7 +50,6 @@ QFace library, that provides a generic autogeneration framework.
Currently, Qt IVI generator has the following limitations:
\list
- \li It's not possible to import other QFace modules using the \c import command.
\li There's no support for external C++ types, outside of the IDL, such as reusing a
QGeoCoordinate inside a QFace IDL.
\li The \c map<> type is not supported.
diff --git a/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc b/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc
index 7b79d1e..f4f2d16 100644
--- a/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc
+++ b/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc
@@ -71,6 +71,10 @@ The following qmake variables are available:
\li QFACE_ANNOTATIONS
\li A list of additional annotation files in YAML format. For more information, see the
\l{annotations-option}{Annotations Option}.
+ \row
+ \li QFACE_IMPORT_PATH
+ \li A list of import paths, which are considered when an IDL file uses an import statement.
+ For more information, see the \l{imports-option}{Import Option}.
\endtable
For more details on the generator's command line arguments, see \l {Use the Generator}.