diff options
author | Topi Reinio <topi.reinio@qt.io> | 2018-03-01 13:44:35 +0100 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2018-04-12 20:59:42 +0000 |
commit | fe8be8f48cf384a2f1b0f7c03a83aaa81680151b (patch) | |
tree | f4ddea44be8ae40015c51444118d9c6af7a7d099 | |
parent | 5f9b1bca4af0bc7801d513a9424c70b47812cf12 (diff) |
Doc: Fix documentation issues when using Clang-enabled QDocv5.11.0-beta4
QDoc in Qt 5.11 uses Clang to parse the C++ source for documentation
comments. Unlike the old parser, Clang requires a module header to
be present as well as correct include paths to generate the docs
correctly. However, these are available from the build system only
when building on macOS, not when generating the documentation
on another system (e.g. Linux).
To fix this, create a 'dummy' module header specific to doc builds
and add required relative include paths and DEFINEs to .qdocconf.
Change-Id: Iadc1475d16c5570b86de7ea8e17bfeb02d8412eb
Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r-- | src/macextras/doc/QtMacExtras/qmacextrasglobal.h | 1 | ||||
-rw-r--r-- | src/macextras/doc/QtMacExtras/qmactoolbaritem.h | 1 | ||||
-rw-r--r-- | src/macextras/doc/QtMacExtrasDoc | 5 | ||||
-rw-r--r-- | src/macextras/doc/qtmacextras.qdocconf | 11 |
4 files changed, 18 insertions, 0 deletions
diff --git a/src/macextras/doc/QtMacExtras/qmacextrasglobal.h b/src/macextras/doc/QtMacExtras/qmacextrasglobal.h new file mode 100644 index 0000000..93de6b4 --- /dev/null +++ b/src/macextras/doc/QtMacExtras/qmacextrasglobal.h @@ -0,0 +1 @@ +#include "../../qmacextrasglobal.h" diff --git a/src/macextras/doc/QtMacExtras/qmactoolbaritem.h b/src/macextras/doc/QtMacExtras/qmactoolbaritem.h new file mode 100644 index 0000000..43acd61 --- /dev/null +++ b/src/macextras/doc/QtMacExtras/qmactoolbaritem.h @@ -0,0 +1 @@ +#include "../../qmactoolbaritem.h" diff --git a/src/macextras/doc/QtMacExtrasDoc b/src/macextras/doc/QtMacExtrasDoc new file mode 100644 index 0000000..b7f32c9 --- /dev/null +++ b/src/macextras/doc/QtMacExtrasDoc @@ -0,0 +1,5 @@ +#include "qmacextrasglobal.h" +#include "qmacfunctions.h" +#include "qmacpasteboardmime.h" +#include "qmactoolbar.h" +#include "qmactoolbaritem.h" diff --git a/src/macextras/doc/qtmacextras.qdocconf b/src/macextras/doc/qtmacextras.qdocconf index 39faeee..7bb599f 100644 --- a/src/macextras/doc/qtmacextras.qdocconf +++ b/src/macextras/doc/qtmacextras.qdocconf @@ -12,6 +12,17 @@ examplesinstallpath = macextras # Add a generic 'Qt Code Sample' thumbnail in Qt Creator for all examples manifestmeta.thumbnail.names += "QtMacExtras/*" +# dummy module header for clang, found under doc/ +moduleheader = QtMacExtrasDoc + +# pass include paths to clang +includepaths += -I . \ + -I .. \ + -I ./QtMacExtras \ + -I $QT_INSTALL_HEADERS + +clangdefines += Q_OS_OSX Q_OS_MACOS QT_PLATFORM_UIKIT + headerdirs += .. sourcedirs += .. imagedirs += images |