Use the Callable helper in QCallableObject
They do the same work in determining the way to call the callable but with slightly different preconditions. Let's just re-use it. Change-Id: Ie2ad54a49250ae8460d8f364f7ea01b651648034 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
parent
4ffb227c78
commit
d8f7b88754
@ -388,7 +388,11 @@ namespace QtPrivate {
|
||||
};
|
||||
|
||||
template<typename Func, typename... Args>
|
||||
using Callable = typename CallableHelper<Func, Args...>::Type;
|
||||
struct Callable : CallableHelper<Func, Args...>::Type
|
||||
{};
|
||||
template<typename Func, typename... Args>
|
||||
struct Callable<Func, List<Args...>> : CallableHelper<Func, Args...>::Type
|
||||
{};
|
||||
|
||||
/*
|
||||
Wrapper around ComputeFunctorArgumentCount and CheckCompatibleArgument,
|
||||
@ -531,10 +535,7 @@ namespace QtPrivate {
|
||||
{
|
||||
using FunctorValue = std::decay_t<Func>;
|
||||
using Storage = QtPrivate::CompactStorage<FunctorValue>;
|
||||
using FuncType = std::conditional_t<std::is_member_function_pointer_v<FunctorValue>,
|
||||
QtPrivate::FunctionPointer<FunctorValue>,
|
||||
QtPrivate::Functor<FunctorValue, Args::size>
|
||||
>;
|
||||
using FuncType = Callable<Func, Args>;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
|
||||
Q_DECL_HIDDEN static void impl(int which, QSlotObjectBase *this_, QObject *r, void **a, bool *ret)
|
||||
|
Loading…
Reference in New Issue
Block a user