From 4bdd8d4ecac42be9e93faa7a2b9ae3448c4f989e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 20 Sep 2018 13:42:57 +0200 Subject: [PATCH] qdoc: Add default include dirs to qdoc command line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change applies to darwin. It adds each include path in the QMAKE_DEFAULT_INCDIRS variable to the qdoc command line with the -I flag for both the prepare and the generate phase. These include paths provide access to the standard c++ and c headers, which clang needs to see. This change should work on all platforms, but it increased the qdoc warning count on the linuxsystem where it was tested, so now it only applies to darwin. Change-Id: I16e2e0d744e2cf68743dc12d39155dda2ece1536 Reviewed-by: Tor Arne Vestbø --- mkspecs/features/qt_docs.prf | 6 ++++++ src/corelib/kernel/qvariant.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf index 3139c443c6..e4df3c0b48 100644 --- a/mkspecs/features/qt_docs.prf +++ b/mkspecs/features/qt_docs.prf @@ -78,6 +78,12 @@ doc_command = $$QDOC $$QMAKE_DOCS prepare_docs { prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors $(INCPATH) generate_docs.commands += $$doc_command -generate $$DOC_INDEXES $(INCPATH) + darwin { + for (incdir, $$QMAKE_DEFAULT_INCDIRS) { + prepare_docs.commands += -I$$shell_quote($$incdir) + generate_docs.commands += -I$$shell_quote($$incdir) + } + } prepare_docs.depends += qtattributionsscanner } else { html_docs.commands += $$doc_command $$DOC_INDEXES $(INCPATH) diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index ff73c27b6e..f92eb1a340 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -365,7 +365,7 @@ class Q_CORE_EXPORT QVariant static inline QVariant fromValue(const T &value) { return qVariantFromValue(value); } -#if defined(Q_CLANG_QDOC) || (QT_HAS_INCLUDE() && __cplusplus >= 201703L) +#if QT_HAS_INCLUDE() && __cplusplus >= 201703L template static inline QVariant fromStdVariant(const std::variant &value) {