diff --git a/src/wobjectimpl.h b/src/wobjectimpl.h index 5e32ff2..76c721b 100644 --- a/src/wobjectimpl.h +++ b/src/wobjectimpl.h @@ -1026,7 +1026,7 @@ inline auto propReset(F f, O *o) W_RETURN(((o->*f)(),0)) template inline void propReset(T...) {} -#if QT_VERSION >= QT_VERSION_CHECK(6,3,0) +#if QT_VERSION >= QT_VERSION_CHECK(6,3,0) && QT_VERSION < QT_VERSION_CHECK(6, 8, 0) // note: Qt 6.3 introduced a check here that allows only QObjects - but we need it for Gadgets as well template struct FunctorCall; template @@ -1063,6 +1063,58 @@ struct FunctorCall, QtPrivate::List, R (o->*f)((*reinterpret_cast::Type *>(arg[II+1]))...), QtPrivate::ApplyReturnValue(arg[0]); } }; +#elif QT_VERSION >= QT_VERSION_CHECK(6, 8, 0) +template struct FunctorCall; +template +struct FunctorCall, QtPrivate::List, R, Function> : QtPrivate::FunctorCallBase { + static void call(Function f, void **arg) + { + using namespace QtPrivate; + call_internal(arg, [&] { + return f((*reinterpret_cast::Type *>(arg[II+1]))...); + }); + } +}; +template +struct FunctorCall, QtPrivate::List, R, SlotRet (Obj::*)(SlotArgs...)> : QtPrivate::FunctorCallBase { + static void call(SlotRet (Obj::*f)(SlotArgs...), Obj *o, void **arg) + { + using namespace QtPrivate; + call_internal(arg, [&] { + return (o->*f)((*reinterpret_cast::Type *>(arg[II+1]))...); + }); + } +}; +template +struct FunctorCall, QtPrivate::List, R, SlotRet (Obj::*)(SlotArgs...) const> : QtPrivate::FunctorCallBase { + static void call(SlotRet (Obj::*f)(SlotArgs...) const, Obj *o, void **arg) + { + using namespace QtPrivate; + call_internal(arg, [&] { + return (o->*f)((*reinterpret_cast::Type *>(arg[II+1]))...); + }); + } +}; +template +struct FunctorCall, QtPrivate::List, R, SlotRet (Obj::*)(SlotArgs...) noexcept> : QtPrivate::FunctorCallBase { + static void call(SlotRet (Obj::*f)(SlotArgs...) noexcept, Obj *o, void **arg) + { + using namespace QtPrivate; + call_internal(arg, [&]() noexcept { + return (o->*f)((*reinterpret_cast::Type *>(arg[II+1]))...); + }); + } +}; +template +struct FunctorCall, QtPrivate::List, R, SlotRet (Obj::*)(SlotArgs...) const noexcept> : QtPrivate::FunctorCallBase { + static void call(SlotRet (Obj::*f)(SlotArgs...) const noexcept, Obj *o, void **arg) + { + using namespace QtPrivate; + call_internal(arg, [&]() noexcept { + return (o->*f)((*reinterpret_cast::Type *>(arg[II+1]))...); + }); + } +}; #endif struct FriendHelper {