W3cubDocs

/Qt 5.15

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.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.15/23-qdoc-configuration-cppvariables.html