diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-08-26 17:18:40 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-08-27 15:45:25 +0200 |
commit | 7d4d47de7049ba52726071d4d2ba03fc014aa48d (patch) | |
tree | 2f97c146dd7b27febc4acdb6944f2dfdffa08b6b /cmake | |
parent | c9830c2fb902f26dc8b2df61dfadc2d7a7d2b30e (diff) |
QObject::connect(): fail to connect to a functor if UniqueConnection is passed
The connect() documentation makes it clear that UniqueConnection does
not work with free functions / function objects and the like; only with
actual PMFs. Rather than silently *ignoring* the flag, be vocal about its
presence by warning, and make the connection fail (as the user has
passed an illegal argument).
[ChangeLog][QtCore][QObject] QObject::connect() now will refuse to
connect a signal to a free function / function object if UniqueConnection
is passed. Note that UniqueConnection has never worked for such
connections -- the flag was simply ignored, and they were established
multiple times. Now, the flag is not ignored and results in a connection
failure (as well as a runtime warning by Qt).
Change-Id: I6509667018c74f9bd24910cde0a1b16c5f84f064
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'cmake')
0 files changed, 0 insertions, 0 deletions