summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-07-12 16:07:23 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-07-19 13:17:59 +0000
commitf46b3e002dfad5d035c9cfaf8ab5c99eba5c312a (patch)
tree75c362c4fdee03b4ea35a26266665d16c6e29f3c
parentc4db0046ec7d6c17b5ed46e1b0125394a37507c5 (diff)
Doc: Hide weak overload template magic from documentation
Hide the 'template magic' to implement Q_WEAK_OVERLOAD from the documentation. So far Q_WEAK_OVERLOAD void foo() lead to template <typename> void foo() in the generated documentation, which is arguably confusing to the uninitiated. And people interested in implementation details & exact overload resolution will arguably just read the .h files themselves. Fixes: QTBUG-104851 Change-Id: I5e0b1b337b28e621e6a627241aa8037da0a879a7 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit f71aeea9329faf33d7161e6af88e2a94a35edb9f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--doc/global/qt-cpp-defines.qdocconf1
-rw-r--r--src/corelib/global/qcompilerdetection.h6
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/global/qt-cpp-defines.qdocconf b/doc/global/qt-cpp-defines.qdocconf
index 5c762083a2..37f176913a 100644
--- a/doc/global/qt-cpp-defines.qdocconf
+++ b/doc/global/qt-cpp-defines.qdocconf
@@ -123,7 +123,6 @@ Cpp.ignoretokens += \
Q_SVG_EXPORT \
Q_TESTLIB_EXPORT \
Q_TYPENAME \
- Q_WEAK_OVERLOAD \
Q_WIDGETS_EXPORT \
Q_WINEXTRAS_EXPORT \
Q_XML_EXPORT \
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index c63dee8279..8eed07f791 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -1205,7 +1205,11 @@
* "Weak overloads" - makes an otherwise confliciting overload weaker
* (by making it a template)
*/
-#define Q_WEAK_OVERLOAD template <typename = void>
+#ifndef Q_CLANG_QDOC
+# define Q_WEAK_OVERLOAD template <typename = void>
+#else
+# define Q_WEAK_OVERLOAD
+#endif
/*
* Warning/diagnostic handling