diff --git a/src/common/QskMetaFunction.cpp b/src/common/QskMetaFunction.cpp index 45f7e7cb..8ad62073 100644 --- a/src/common/QskMetaFunction.cpp +++ b/src/common/QskMetaFunction.cpp @@ -7,9 +7,7 @@ #include #include -#if QT_CONFIG(thread) #include -#endif #include QSK_QT_PRIVATE_BEGIN @@ -190,8 +188,6 @@ void QskMetaFunction::invoke( QObject* object, ? Qt::QueuedConnection : Qt::DirectConnection; } - const auto argc = parameterCount() + 1; // return value + arguments - switch ( invokeType ) { case Qt::DirectConnection: @@ -215,7 +211,7 @@ void QskMetaFunction::invoke( QObject* object, m_functionCall, nullptr, 0, argv, &semaphore ); #else auto event = new QMetaCallEvent( - m_functionCall, nullptr, 0, argc ); + m_functionCall, nullptr, 0, argv, nullptr ); #endif QCoreApplication::postEvent( receiver, event ); @@ -231,6 +227,8 @@ void QskMetaFunction::invoke( QObject* object, if ( receiver.isNull() ) return; + const auto argc = parameterCount() + 1; // return value + arguments + auto event = new QMetaCallEvent( m_functionCall, nullptr, 0, argc ); auto types = event->types(); diff --git a/src/common/QskMetaInvokable.cpp b/src/common/QskMetaInvokable.cpp index 27828c3b..cc372bbc 100644 --- a/src/common/QskMetaInvokable.cpp +++ b/src/common/QskMetaInvokable.cpp @@ -9,9 +9,7 @@ #include #include #include -#if QT_CONFIG(thread) #include -#endif #include QSK_QT_PRIVATE_BEGIN @@ -165,12 +163,6 @@ static void qskInvokeMetaCall( ? Qt::QueuedConnection : Qt::DirectConnection; } -#if 1 - // should be doable without QMetaMethod. TODO ... - const auto method = metaObject->method( offset + index ); -#endif - const int argc = method.parameterCount() + 1; - switch ( invokeType ) { case Qt::DirectConnection: @@ -208,7 +200,7 @@ static void qskInvokeMetaCall( #else auto event = new MetaCallEvent( call, metaObject, - offset, index, argc ); + offset, index, args, nullptr ); #endif QCoreApplication::postEvent( receiver, event ); @@ -228,6 +220,12 @@ static void qskInvokeMetaCall( if ( call == QMetaObject::InvokeMetaMethod ) { +#if 1 + // should be doable without QMetaMethod. TODO ... + const auto method = metaObject->method( offset + index ); +#endif + const int argc = method.parameterCount() + 1; + event = new MetaCallEvent( call, metaObject, offset, index, argc ); /*