C++ Specific Configuration Variables | QDoc Manual 5.9

Qt 5.9 | QDoc Manual | C++ Specific Configuration Variables

Qt 5.9.3 Reference Documentation

Creating Help Project Files ◦ HTML Specific Configuration Variables

# C++ Specific Configuration Variables

The C++ specific configuration variables are provided to avoid erroneous documentation due to non-standard C++ constructs.

## Cpp.ignoredirectives

The `Cpp.ignoredirectives` variable makes QDoc ignore the specified non-standard constructs, within C++ source code.

If not specified by the `Cpp.ignoretokens` or `Cpp.ignoredirectives` variables, non-standard constructs (typically macros) can result in erroneous documentation.

      Cpp.ignoredirectives = Q_DECLARE_INTERFACE \
                             Q_DECLARE_OPERATORS_FOR_FLAGS \
                             Q_DECLARE_PRIVATE \
                             Q_DECLARE_PUBLIC \
                             Q_DISABLE_COPY \
                             Q_DUMMY_COMPARISON_OPERATOR \
                             Q_ENUMS \
                             Q_FLAGS \
                             Q_INTERFACES \
                             __attribute__

makes sure that when processing the code below, for example, QDoc will simply ignore the 'Q_ENUMS' and 'Q_FLAGS' expressions:

      class Q_CORE_EXPORT Qt {
          Q_OBJECT
          Q_ENUMS(Orientation TextFormat BackgroundMode
                  DateFormat ScrollBarPolicy FocusPolicy
                  ContextMenuPolicy CaseSensitivity
                  LayoutDirection ArrowType)
          Q_ENUMS(ToolButtonStyle)
          Q_FLAGS(Alignment)
          Q_FLAGS(Orientations)
          Q_FLAGS(DockWidgetAreas)

        public:
          ...
      };

The Q_OBJECT macro, however, is an exception: QDoc recognizes this particular non-standard construct, so there is no need specifying it using the `Cpp.ignoredirectives` variable.

Regarding the Q_CORE_EXPORT macro; see the documentation of the `Cpp.ignoretokens` variable.

See also Cpp.ignoretokens.

## Cpp.ignoretokens

The `Cpp.ignoretokens` variable makes QDoc ignore the specified non-standard constructs, within C++ source code.

If not specified by the `Cpp.ignoretokens` or `Cpp.ignoredirectives` variables, non-standard constructs (typically macros) can result in erroneous documentation.

In qtgui.qdocconf:

      Cpp.ignoretokens = QAXFACTORY_EXPORT \
                         QM_EXPORT_CANVAS \
                         ...
                         Q_COMPAT_EXPORT \
                         Q_CORE_EXPORT \
                         Q_EXPLICIT \
                         Q_EXPORT \
                         ...
                         Q_XML_EXPORT

makes sure that when processing the code below, for example, QDoc will simply ignore the 'Q_CORE_EXPORT' expression:

      class Q_CORE_EXPORT Qt {
          Q_OBJECT
          Q_ENUMS(Orientation TextFormat BackgroundMode
                  DateFormat ScrollBarPolicy FocusPolicy
                  ContextMenuPolicy CaseSensitivity
                  LayoutDirection ArrowType)
          Q_ENUMS(ToolButtonStyle)
          Q_FLAGS(Alignment)
          Q_FLAGS(Orientations)
          Q_FLAGS(DockWidgetAreas)
        public:
          ...
      };

Regarding the Q_OBJECT, Q_ENUMS and Q_FLAGS macros; see the documentation of the `Cpp.ignoredirectives` variable.

See also Cpp.ignoredirectives.

Creating Help Project Files ◦ HTML Specific Configuration Variables