aboutsummaryrefslogtreecommitdiffstats
path: root/doc/typesystem_solving_compilation.rst
blob: 81d14a187eb0438f6d0708f38b1ef7ccb53b0427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Solving compilation problems
----------------------------

suppress-warning
^^^^^^^^^^^^^^^^

    The generator will generate several warnings which may be irrelevant to the
    user. The suppress-warning node suppresses the specified warning, and it is
    a child of the typesystem node.

    .. code-block:: xml

        <typesystem>
            <suppress-warning text="..." />
        </typesystem>

    The **text** attribute is the warning text to suppress, and may contain the *
    wildcard (use "" to escape regular expression matching if the warning contain
    a regular "*").

extra-includes
^^^^^^^^^^^^^^

    The extra-includes node contains declarations of additional include files,
    and it can be a child of the interface-type, namespace-type, value-type and
    object-type nodes.

    The generator automatically tries to read the global header for each type but
    sometimes it is required to include extra files in the generated C++ code to
    make sure that the code compiles. These files must be listed using include
    nodes witin the extra-include node:

    .. code-block:: xml

         <value-type>
             <extra-includes>
                 <include file-name="..." location="global | local"/>
             </extra-includes>
         </value-type>

    The **file-name** attribute is the file to include, such as "QStringList".
    The **location** attribute is where the file is located: *global* means that
    the file is located in $INCLUDEPATH and will be included using #include <...>,
    *local* means that the file is in a local directory and will be included
    using #include "...".


include
^^^^^^^

    The include node specifies the name and location of a file that must be
    included, and it is a child of the interface-type, namespace-type, value-type,
    object-type or extra-includes nodes

    The generator automatically tries to read the global header for each type. Use
    the include node to override this behavior, providing an alternative file. The
    include node can also be used to specify extra include files.

    .. code-block:: xml

         <value-type>
             <include file-name="..."
                 location="global | local"/>
         </value-type>

    The **file-name** attribute is the file to include, such as "QStringList".
    The **location** attribute is where the file is located: *global* means that
    the file is located in $INCLUDEPATH and will be included using #include <...>,
    *local* means that the file is in a local directory and will be included
    using #include "...".