From 5ba6f77f8c94c66a399a0de0522d3febf76af297 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 5 Apr 2024 20:15:39 +0200 Subject: [PATCH] QTypeInfo: remove docs about how Qt's autodetection works I don't think we should document *exactly* how we autodetect primitive/relocatable types: we've been changing the detection across Qt versions because sometimes we realized that it was wrong. Moreover, no one else but us should be using the traits in question (in other words: QTypeInfo itself isn't public API). Pick-to: 6.5 6.2 Change-Id: Ie6e763f152e7dc0f6ce58869dbbd529240d2a546 Reviewed-by: Thiago Macieira (cherry picked from commit ae361f00b3f4827e62a19cc451227c9892b51f2e) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qtypeinfo.qdoc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/corelib/global/qtypeinfo.qdoc b/src/corelib/global/qtypeinfo.qdoc index 78d9d423cd4..97c0aa161b6 100644 --- a/src/corelib/global/qtypeinfo.qdoc +++ b/src/corelib/global/qtypeinfo.qdoc @@ -41,15 +41,8 @@ \snippet code/src_corelib_global_qglobal.cpp 39 - Qt will try to detect the class of a type using - \l {https://en.cppreference.com/w/cpp/types/is_trivial} {std::is_trivial_v} - to identify primitive - types and it will require both - \l {https://en.cppreference.com/w/cpp/types/is_trivially_copyable} {std::is_trivially_copyable_v} - and - \l {https://en.cppreference.com/w/cpp/types/is_destructible} {std::is_trivially_destructible_v} - to identify relocatable types. - Use this macro to tune the behavior. + Qt will try to detect the class of a type using standard C++ type traits; + use this macro to tune the behavior. For instance many types would be candidates for Q_RELOCATABLE_TYPE despite not being trivially-copyable. */