From 77d63db06f940cce7d2624808396d6375b90d8ab Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Sun, 30 Aug 2020 11:55:04 +0200 Subject: [PATCH] Doc fix: functions may actually have fewer arguments than the signal See tst_QObject::connectFunctorArgDifference() Change-Id: I8b027fd3095ff7f90e5087be94978b05db79b120 Reviewed-by: Mitch Curtis Reviewed-by: Fabian Kosmale --- src/corelib/kernel/qobject.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index b749e3916cf..6cc0a9a4e72 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -4738,9 +4738,8 @@ void qDeleteInEventHandler(QObject *o) The signal must be a function declared as a signal in the header. The slot function can be any function or functor that can be connected to the signal. - A function can be connected to a given signal if the signal has at - least as many argument as the slot. A functor can be connected to a signal - if they have exactly the same number of arguments. There must exist implicit + A slot function can be connected to a given signal if the signal has at + least as many arguments as the slot function. There must exist implicit conversion between the types of the corresponding arguments in the signal and the slot. @@ -4778,9 +4777,8 @@ void qDeleteInEventHandler(QObject *o) The signal must be a function declared as a signal in the header. The slot function can be any function or functor that can be connected to the signal. - A function can be connected to a given signal if the signal has at - least as many argument as the slot. A functor can be connected to a signal - if they have exactly the same number of arguments. There must exist implicit + A slot function can be connected to a given signal if the signal has at + least as many arguments as the slot function. There must exist implicit conversion between the types of the corresponding arguments in the signal and the slot.