qt5base-lts/tests/auto/corelib/kernel/qmetaobject
Volker Hilsheimer 9c9c5d9828 Fix QMetaObject::invokeMethod for free functions and std::bind
Amends 3bf5b5f894, after which free
functions and std::bind could no longer be used as callables in
QMetaMethod::invokeMethod.

For free functions to work we need to decay to function pointers when
choosing what type QtPrivate::Callable aliases.

And std::bind has operator() overloads and the return type cannot be
deduced. So simplify the definition of the ZeroArgFunctor - we know
the function prototype if we know the return type.

Add testcase for calling std::bind and free function, and remove the
now unneeded helpers for functor argument and return type deduction.

Change-Id: I54aac5cb6d660267e6b2f5ab05d583e8826cdf9a
Reviewed-by: Zoltan Gera <zoltan.gera@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-11 19:36:55 +02:00
..
.gitignore
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
forwarddeclared.cpp QMetaObject: pass the QMetaTypes in variadic invoke/newInstance 2022-09-01 21:29:04 -03:00
forwarddeclared.h QMetaObject: pass the QMetaTypes in variadic invoke/newInstance 2022-09-01 21:29:04 -03:00
tst_qmetaobject.cpp Fix QMetaObject::invokeMethod for free functions and std::bind 2023-05-11 19:36:55 +02:00