aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/qtqml-qtquick-compiler-tech.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc/src/qtqml-qtquick-compiler-tech.qdoc')
-rw-r--r--src/qml/doc/src/qtqml-qtquick-compiler-tech.qdoc24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/qml/doc/src/qtqml-qtquick-compiler-tech.qdoc b/src/qml/doc/src/qtqml-qtquick-compiler-tech.qdoc
index 293546255f..3631a85b5f 100644
--- a/src/qml/doc/src/qtqml-qtquick-compiler-tech.qdoc
+++ b/src/qml/doc/src/qtqml-qtquick-compiler-tech.qdoc
@@ -7,7 +7,7 @@
\title Qt Quick Compiler
\brief Overview of Qt Quick Compiler components
-Qt Quick Compiler enables you to process QML and JavaScript code at compile
+Qt Quick Compiler lets you process QML and JavaScript code at compile
time, rather than at run time. This allows for:
\list
@@ -17,17 +17,17 @@ time, rather than at run time. This allows for:
The Qt Quick Compiler consist of two components:
\list
- \li \l {QML Type Compiler}
- \li \l {QML Script Compiler}
+ \li \l {QML type compiler}
+ \li \l {QML script compiler}
\endlist
\note \e qmltc, \e qmlsc and \l qmlcachegen are internal build tools. If you
need to care about their invocation, you are either writing a build system, or
you are doing something wrong.
-\subtitle The QML Type Compiler
+\section1 The QML type compiler
-The \l{QML Type Compiler}, \e(qmltc) compiles QML types to C++ classes. These C++
+The \l{QML type compiler}, \e(qmltc) compiles QML types to C++ classes. These C++
classes are then added to your application and can be instantiated from other
C++ code. This way you can avoid much of the overhead of using \l{QQmlComponent}
to create instances of your QML types. In order to benefit from \l qmltc, you
@@ -38,12 +38,16 @@ structure. It will fail if an unsupported language feature is encountered.
It does not have to understand the JavaScript code in bindings and functions,
though.
-\subtitle The QML Script Compiler
+\section1 The QML script compiler
-The \l{QML Script Compiler}, (\e qmlsc and \e qmlcachegen) compiles bindings and
+The \l{QML script compiler}, (\e qmlsc and \e qmlcachegen) compiles bindings and
functions to both, an efficient byte code and C++ functions. This process
automatically happens behind the scenes if you are using \l{qt_add_qml_module}
-to specify your QML modules. At compile time, for each QML or JavaScript
+to specify your QML modules. For more information about available options to
+control different aspects of QML compilation, see
+\l {Caching compiled QML sources}.
+
+At compile time, for each QML or JavaScript
document a corresponding C++ file is created and built into the application. The
C++ file then contains a \e{QML compilation unit}, which consists of:
@@ -63,7 +67,7 @@ involved type analysis can be performed. Therefore, the generated C++ code
is generally more efficient than the result of the JIT compilation.
There are limitations on what JavaScript constructs can be compiled to C++.
-For more information see \l {Limitations when compiling JavaScript}.
+For more information, see \l {Limitations when compiling JavaScript to C++}.
\e{qmlsc} will be used instead of \e{qmlcachegen} if the Qt Quick Compiler
Extensions are installed. It has the following additional features over
@@ -89,7 +93,7 @@ Compilation of bindings and functions to C++ is omitted if cache files are
produced. Neither the CMake nor the qmake build system offered by Qt expose this
functionality.
-\subtitle Summary
+\section1 Summary
The following table summarizes the differences between \l{qmltc},
\l{qmlcachegen} and \l{qmlsc}: