From 3b0da20d138866c6bb5af33bf5cb46ef803e18fb Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Mon, 22 Sep 2025 18:14:15 +0000 Subject: Revert "QObject: clarify what `method` is in string-based (dis)connect overloads" This reverts commit 6f353fc17a3a6f1786359df36db209d6c5b0fa42. As pointed out in code review, using SLOT() to find a Q_INVOKABLE method isn't the intended behavior; it should only work with functions declared as slots; pointed out by Thiago in code review. Pick-to: 6.10 6.9 6.8 6.5 Change-Id: I000438b7901a8eb0392731564005bfdd85740c77 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qobject.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/corelib/kernel/qobject.cpp') diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index fb4d8ab4b50..374741cb754 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -2968,12 +2968,6 @@ static inline void check_and_warn_compat(const QMetaObject *sender, const QMetaM Returns a handle to the connection that can be used to disconnect it later. - \a signal must be a member function decleared as a signal in \a sender. - - \a method must be a member function declared as a signal, slot, or - \l{Q_INVOKABLE}{invokable} in \a receiver, that is, functions registered - with the meta-object system. - You must use the \c SIGNAL() and \c SLOT() macros when specifying the \a signal and the \a method, for example: @@ -3261,13 +3255,6 @@ QMetaObject::Connection QObject::connect(const QObject *sender, const QMetaMetho \a receiver. Returns \c true if the connection is successfully broken; otherwise returns \c false. - \a signal, if not \nullptr, must be a member function decleared as a signal - in \a sender. - - \a method, if not \nullptr, must be a member function declared as a signal, - slot, or \l{Q_INVOKABLE}{invokable} in \a receiver, that is, functions - registered with the meta-object system. - A signal-slot connection is removed when either of the objects involved are destroyed. -- cgit v1.2.3