diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2020-01-03 15:03:39 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2020-01-17 02:22:22 +0100 |
commit | 983432effdae888a372d814ff9516abbcb7a3c29 (patch) | |
tree | c93a17a50d71508b59f1bb22f48727ccaf2370d1 /src/corelib/kernel/qobject.cpp | |
parent | 4772a2da15ae0624633f3fc4d029d5f0e1e33892 (diff) |
Introduce Q_MOC_INCLUDE
A new macro that can be added in the header file parsed by moc to tell moc
to include that file in the generated file
Change-Id: I03ad702c3fcd8380371015f226ee4b7456daf132
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 133ccc88d9..c72383ff4a 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4543,6 +4543,23 @@ QDebug operator<<(QDebug dbg, const QObject *o) */ /*! + \macro Q_MOC_INCLUDE + \relates QObject + \since 6.0 + + The Q_MOC_INCLUDE macro can be used within or outside a class, and tell the + \l{moc}{Meta Object Compiler} to add an include. + + \code + // Put this in your code and the generated code will include this header. + Q_MOC_INCLUDE("myheader.h") + \endcode + + This is useful if the types you use as properties or signal/slots arguments + are forward declared. +*/ + +/*! \macro Q_SIGNALS \relates QObject |