qt5base-lts/tests/auto/corelib/kernel
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
..
qapplicationstatic Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qcoreapplication tst_QCoreApplication: ensure that theMainThread has expected states 2023-04-26 04:55:47 -03:00
qdeadlinetimer QDeadlineTimer: make it so any negative millisecond count is "forever" 2023-05-11 00:28:49 -07:00
qelapsedtimer QElapsedTimer: rewrite using std::chrono::steady_clock everywhere 2023-04-18 19:23:42 -03:00
qeventdispatcher QThread: add sleep(std::chrono::nanoseconds) overload 2023-03-13 23:26:28 +02:00
qeventloop tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qjnienvironment CMake: Remove direct qt_android_generate_deployment_settings call 2022-12-15 20:23:28 +01:00
qjniobject CMake: Remove direct qt_android_generate_deployment_settings call 2022-12-15 20:23:28 +01:00
qjnitypes JNI: add generic support for array-types 2022-10-10 20:19:30 +02:00
qmath tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmetacontainer tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmetaenum tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmetamethod tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmetaobject Fix QMetaObject::invokeMethod for free functions and std::bind 2023-05-11 19:36:55 +02:00
qmetaobjectbuilder moc: Record types of enumerations 2023-03-31 17:42:58 +02:00
qmetaproperty tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qmetatype QMetaType: Provide underlyingType for enums 2023-03-28 10:59:53 +02:00
qmimedata tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qobject Rename QFunctorSlotObject to QCallableObject 2023-05-10 10:30:54 +02:00
qpermission Simplify the creation of APIs that take a callback 2023-04-26 22:06:31 +02:00
qpointer QPointer: also make conversion to pointer-to-const work 2023-05-11 08:10:16 +00:00
qproperty Avoid capturing same property twice 2023-04-18 13:23:48 +02:00
qsignalblocker tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qsignalmapper tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qsocketnotifier QTestEventLoop: add enterLoop(std::chrono::milliseconds) overload 2023-03-03 21:36:48 +02:00
qtimer QTimer: optimize single shot timers that cross thread 2023-04-20 20:23:37 +02:00
qtranslator tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qvariant QVariant: Fix support for metatypes created by Qt < 6.5 2023-04-28 12:37:03 +02:00
qwineventnotifier tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
qwinregistrykey QWinRegistryKey: Fix how we handle the default value, take 2 2022-10-28 09:27:13 +00:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00