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 <riitta-leena.miettinen@qt.io>
This commit is contained in:
Eike Ziller
2019-05-20 15:07:29 +02:00
parent c81d672bb0
commit a467e34e58
3 changed files with 15 additions and 3 deletions

View File

@@ -9,7 +9,6 @@ defines = Q_QDOC \
Q_OS_.* \ Q_OS_.* \
Q_BYTE_ORDER \ Q_BYTE_ORDER \
QT_DEPRECATED \ QT_DEPRECATED \
Q_NO_USING_KEYWORD \ Q_NO_USING_KEYWORD
__cplusplus
versionsym = QT_VERSION_STR versionsym = QT_VERSION_STR

View File

@@ -41,7 +41,7 @@ for (doc_file, DOC_FILES) {
DOC_TARGETDIR = $$DOC_TARGET DOC_TARGETDIR = $$DOC_TARGET
DOC_OUTPUTDIR = $${DOCS_BASE_OUTDIR}/$${DOC_TARGETDIR}$${DOC_OUTDIR_POSTFIX} 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} QMAKE_EXTRA_TARGETS += html_docs_$${DOC_TARGET}
!isEmpty(html_docs.commands): html_docs.commands += && !isEmpty(html_docs.commands): html_docs.commands += &&

View File

@@ -41,4 +41,17 @@ DOC_HTML_INSTALLDIR = $$INSTALL_DOC_PATH
DOC_QCH_OUTDIR = $$IDE_DOC_PATH DOC_QCH_OUTDIR = $$IDE_DOC_PATH
DOC_QCH_INSTALLDIR = $$INSTALL_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) include(doc/doc_targets.pri)