From a467e34e58807fe9f63e49e01fb6ee92fd48e3c1 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 20 May 2019 15:07:29 +0200 Subject: [PATCH] Fix qdoc call after it moved to LLVM/Clang For some unknown reason qdoc does not add the include paths for Qt modules, so we need to do that manually. Also, if we do that, we need to pass it the default include paths, so standard C++ headers are found. Qt includes and standard headers are found now, but Framework style includes on macOS still fail ("QtCore/QString"), which are used in Qt headers as well. Looks like the framework path that is passed with -F to qdoc is not passed on correctly. Task-number: QTCREATORBUG-22451 Change-Id: I04b2c75ecdeb1f0e70ba9adfea039f0ff16ec96b Reviewed-by: Leena Miettinen --- doc/config/qt-defines.qdocconf | 3 +-- doc/doc_targets.pri | 2 +- docs.pri | 13 +++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/config/qt-defines.qdocconf b/doc/config/qt-defines.qdocconf index b8daa054972..faef889fec8 100644 --- a/doc/config/qt-defines.qdocconf +++ b/doc/config/qt-defines.qdocconf @@ -9,7 +9,6 @@ defines = Q_QDOC \ Q_OS_.* \ Q_BYTE_ORDER \ QT_DEPRECATED \ - Q_NO_USING_KEYWORD \ - __cplusplus + Q_NO_USING_KEYWORD versionsym = QT_VERSION_STR diff --git a/doc/doc_targets.pri b/doc/doc_targets.pri index 808d5e9fcfd..23fd0fee717 100644 --- a/doc/doc_targets.pri +++ b/doc/doc_targets.pri @@ -41,7 +41,7 @@ for (doc_file, DOC_FILES) { DOC_TARGETDIR = $$DOC_TARGET DOC_OUTPUTDIR = $${DOCS_BASE_OUTDIR}/$${DOC_TARGETDIR}$${DOC_OUTDIR_POSTFIX} - html_docs_$${DOC_TARGET}.commands = $$QDOC -outputdir $$shell_quote($$DOC_OUTPUTDIR) $$doc_file $$DOC_INDEXES + html_docs_$${DOC_TARGET}.commands = $$QDOC -outputdir $$shell_quote($$DOC_OUTPUTDIR) $$doc_file $$DOC_INDEXES $$DOC_INCLUDES QMAKE_EXTRA_TARGETS += html_docs_$${DOC_TARGET} !isEmpty(html_docs.commands): html_docs.commands += && diff --git a/docs.pri b/docs.pri index 3f37d7f4e7d..48d22a458b5 100644 --- a/docs.pri +++ b/docs.pri @@ -41,4 +41,17 @@ DOC_HTML_INSTALLDIR = $$INSTALL_DOC_PATH DOC_QCH_OUTDIR = $$IDE_DOC_PATH DOC_QCH_INSTALLDIR = $$INSTALL_DOC_PATH +minQtVersion(5, 11, 0) { + for (include_path, INCLUDEPATH): \ + DOC_INCLUDES += -I $$shell_quote($$include_path) + for (module, QT) { + MOD_INCLUDES = $$eval(QT.$${module}.includes) + for (include_path, MOD_INCLUDES): \ + DOC_INCLUDES += -I $$shell_quote($$include_path) + } + for (include_path, QMAKE_DEFAULT_INCDIRS): \ + DOC_INCLUDES += -I $$shell_quote($$include_path) + macos: DOC_INCLUDES += -F $$shell_quote($$[QT_INSTALL_LIBS]) +} + include(doc/doc_targets.pri)