From b41492d53e733e12351338e03ad471d39d81c0b1 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 1 Mar 2017 15:50:44 +0100 Subject: [PATCH] Doc: Remove references to pre-C++11 recommendations Compiler support for lambda functions and variadic templates is required since Qt 5.7, so no need to mention in the documentation what happens if the compiler doesn't support it. Change-Id: I5caeaa0bd7f0edce81e22e22964e0b7dd042c719 Reviewed-by: Marc Mutz --- .../doc/src/objectmodel/signalsandslots.qdoc | 3 --- src/corelib/kernel/qobject.cpp | 15 ++------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/corelib/doc/src/objectmodel/signalsandslots.qdoc b/src/corelib/doc/src/objectmodel/signalsandslots.qdoc index 6366350cde7..ed61511c62a 100644 --- a/src/corelib/doc/src/objectmodel/signalsandslots.qdoc +++ b/src/corelib/doc/src/objectmodel/signalsandslots.qdoc @@ -364,9 +364,6 @@ connect(sender, &QObject::destroyed, [=](){ this->m_objects.remove(sender); }); \endcode - Note that if your compiler does not support C++11 variadic templates, - this syntax only works if the signal and slot have 6 arguments or less. - The other way to connect a signal to a slot is to use QObject::connect() and the \c{SIGNAL} and \c{SLOT} macros. The rule about whether to diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 8e906b278d5..2f4f76856f5 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4655,12 +4655,8 @@ void qDeleteInEventHandler(QObject *o) make sure to declare the argument type with Q_DECLARE_METATYPE Overloaded functions can be resolved with help of \l qOverload. - - \note The number of arguments in the signal or slot are limited to 6 if - the compiler does not support C++11 variadic templates. */ - /*! \fn QMetaObject::Connection QObject::connect(const QObject *sender, PointerToMemberFunction signal, Functor functor) @@ -4683,7 +4679,7 @@ void qDeleteInEventHandler(QObject *o) \snippet code/src_corelib_kernel_qobject.cpp 45 - If your compiler support C++11 lambda expressions, you can use them: + Lambda expressions can also be used: \snippet code/src_corelib_kernel_qobject.cpp 46 @@ -4693,9 +4689,6 @@ void qDeleteInEventHandler(QObject *o) Overloaded functions can be resolved with help of \l qOverload. - \note If the compiler does not support C++11 variadic templates, the number - of arguments in the signal or slot are limited to 6, and the functor object - must not have an overloaded or templated operator(). */ /*! @@ -4726,7 +4719,7 @@ void qDeleteInEventHandler(QObject *o) \snippet code/src_corelib_kernel_qobject.cpp 50 - If your compiler support C++11 lambda expressions, you can use them: + Lambda expressions can also be used: \snippet code/src_corelib_kernel_qobject.cpp 51 @@ -4736,10 +4729,6 @@ void qDeleteInEventHandler(QObject *o) are still alive when the signal is emitted. Overloaded functions can be resolved with help of \l qOverload. - - \note If the compiler does not support C++11 variadic templates, the number - of arguments in the signal or slot are limited to 6, and the functor object - must not have an overloaded or templated operator(). */ /*!