Skip to content

Commit

Permalink
Doc build: fix conflicting response file with moc
Browse files Browse the repository at this point in the history
Doc build is using the same variable to define the reponse file
as moc build, which can lead to case where moc is using the qdoc's
response file instead of its own. Moc needs more include paths than
qdoc, this can then lead to weird compilation issues as moc doesn't
warn about missing includes.

Task-number: QTBUG-98569
Pick-to: 6.2 5.15
Change-Id: Id35da18f664e2032bae96d11b00dbfe55ce37f66
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
sapiippo committed Nov 29, 2021
1 parent 8568a63 commit ca9d72f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mkspecs/features/qt_docs.prf
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ QT_TOOL_ENV =

# On Windows, put the includes into a .inc file which QDoc will read, if the project
# has too many includes. We do this to overcome a command-line limit on Windows.
WIN_INCLUDETEMP=
QDOC_WIN_INCLUDETEMP=
INCLUDE_PATHS=$$INCPATH
win32:count(INCLUDE_PATHS, 30, >) {
WIN_INCLUDETEMP = $$OUT_PWD/qdocincludepaths.inc
WIN_INCLUDETEMP_CONTENT =
QDOC_WIN_INCLUDETEMP = $$OUT_PWD/qdocincludepaths.inc
QDOC_WIN_INCLUDETEMP_CONTENT =
for (inc, INCLUDE_PATHS): \
WIN_INCLUDETEMP_CONTENT += -I$$inc
write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONTENT)|error()
QDOC_WIN_INCLUDETEMP_CONTENT += -I$$inc
write_file($$absolute_path($$QDOC_WIN_INCLUDETEMP, $$OUT_PWD), QDOC_WIN_INCLUDETEMP_CONTENT)|error()
}

isEmpty(WIN_INCLUDETEMP) {
isEmpty(QDOC_WIN_INCLUDETEMP) {
QDOC_INCLUDE_PATHS=$(INCPATH)
} else {
QDOC_INCLUDE_PATHS=@$$shell_quote($$WIN_INCLUDETEMP)
QDOC_INCLUDE_PATHS=@$$shell_quote($$QDOC_WIN_INCLUDETEMP)
}

macos: QDOC_INCLUDE_PATHS += $$join(QMAKE_DEFAULT_INCDIRS," -I","-I")
Expand Down

0 comments on commit ca9d72f

Please sign in to comment.