From fe8be8f48cf384a2f1b0f7c03a83aaa81680151b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 1 Mar 2018 13:44:35 +0100 Subject: Doc: Fix documentation issues when using Clang-enabled QDoc 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 --- src/macextras/doc/QtMacExtras/qmacextrasglobal.h | 1 + src/macextras/doc/QtMacExtras/qmactoolbaritem.h | 1 + src/macextras/doc/QtMacExtrasDoc | 5 +++++ src/macextras/doc/qtmacextras.qdocconf | 11 +++++++++++ 4 files changed, 18 insertions(+) create mode 100644 src/macextras/doc/QtMacExtras/qmacextrasglobal.h create mode 100644 src/macextras/doc/QtMacExtras/qmactoolbaritem.h create mode 100644 src/macextras/doc/QtMacExtrasDoc 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 -- cgit v1.2.3