qt5base-lts/tests/auto/corelib
Volker Hilsheimer 3bf5b5f894 Use QSlotObject helpers in functor-cases of QMetaObject::invoke
Add helper that allows us to determine the argument list and return type
of a functor. This triggers a compile time error if the functor has
operator()() overloads (we only support zero-argument call operators, but
there might be const/noexcept variations). Use that helper to declare a
ZeroArgFunctor type which also declares a ReturnType and Arguments alias.

Add a Callable alias that now combines FunctionPointer and ZeroArgFunctor
into a single type that we can then use to merge the specializations of
QMetaObject::invokeMethod.

[ChangeLog][Potentially source-incompatible changes] Using a functor
with several operator() overloads in QMetaObject::invokeMethod now causes
a compile time error. Qt would previously ignore const and noexcept
overloads and always call the mutable version on a copy of the functor.

Change-Id: I3eb62c1128014b729575540deab615469290daeb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-05 21:45:56 +02:00
..
animation tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
global Short live Q_NODISCARD_CTOR 2023-04-30 19:42:29 +02:00
io Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00
ipc IPC: tst_QNativeIpcKey: rename duplicate row in test 2023-04-28 22:30:13 -05:00
itemmodels Remove unused variables 2023-04-19 12:55:02 +02:00
kernel Use QSlotObject helpers in functor-cases of QMetaObject::invoke 2023-05-05 21:45:56 +02:00
mimetypes mimetypes/: port to qsizetype 2023-04-15 17:21:10 +02:00
platform tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
plugin QPluginLoader: don't instantiante multiple, identical instances 2023-04-05 00:29:16 -07:00
serialization qc14n.h: general cleanup 2023-05-01 22:52:22 +03:00
text QString: add a tst_QString variant with QT_NO_CAST_FROM_ASCII 2023-04-29 18:15:23 +02:00
thread tst_qthreadpool: expect a warning, cleaning up the test run 2023-05-04 19:40:32 +02:00
time Add a distant-future local-time-type to tst_QDateTime 2023-05-04 14:06:08 +02:00
tools Remove unused variables 2023-04-19 12:55:02 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00