3552821551
SFINAE out the new-style connect() overloads for const char* functions. Before, we detected the problem in the body of connect(), by failing the static_assert for signal/slot argument compatibility, but that's too late. We don't want to select that overload at all, because we want that decltype(QObject::connect(QAction*, &QAction::triggered, QObject*, SLOT(something())) SFINAEs instead of returning QMetaObject::Connect, because then all the classes that provide convenience new-style connect syntax by wrapping the QObject::connect() call can just use that decltype() to accept anything that will succeed in the wrapped connect() call instead of manually trying (and failing) to provide proper overloads themselves. [ChangeLog][QtCore][Potentially Source-Incompatible Changes] QObject::connect(sender, pointer-to-member, [receiver, ], SLOT(~~~)) is now SFINAEd out instead of triggering a static_assert(). That means it is now possible to use Expression SFINAE (decltype(QObject::connect(<sender>, <signal>, std::declval<Args>()...) to properly wrap new-style QObject::connect() calls with a single wrapper function, greatly simplifying the implementation, incl. passing Qt::ConnectionType arguments. For more information on how to use this in your own code, see the sources of QWidget::addAction(). Change-Id: I4052a49eacd63a432a9648a667adc435744a633d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> |
||
---|---|---|
.github/workflows | ||
bin | ||
cmake | ||
coin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
libexec | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
util | ||
.cmake.conf | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.qmake.conf | ||
.tag | ||
CMakeLists.txt | ||
conanfile.py | ||
config_help.txt | ||
configure | ||
configure.bat | ||
configure.cmake | ||
dependencies.yaml | ||
LICENSE.FDL | ||
LICENSE.GPL2 | ||
LICENSE.GPL3 | ||
LICENSE.GPL3-EXCEPT | ||
LICENSE.LGPL3 | ||
LICENSE.LGPLv3 | ||
LICENSE.QT-LICENSE-AGREEMENT | ||
qt_cmdline.cmake | ||
sync.profile |