diff --git a/src/common/QskMetaFunction.cpp b/src/common/QskMetaFunction.cpp index 534c12ff..9ee739f6 100644 --- a/src/common/QskMetaFunction.cpp +++ b/src/common/QskMetaFunction.cpp @@ -21,8 +21,16 @@ static inline void qskInvokeFunctionQueued( QObject* object, constexpr QObject* sender = nullptr; constexpr int signalId = 0; +#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 ) + Q_UNUSED( types ) + Q_UNUSED( argc ) + + auto event = new QMetaCallEvent( + functionCall, sender, signalId, argv, semaphore ); +#else auto event = new QMetaCallEvent( functionCall, sender, signalId, argc, types, argv, semaphore ); +#endif QCoreApplication::postEvent( object, event ); } @@ -58,7 +66,11 @@ int QskMetaFunction::FunctionCall::typeInfo() const int QskMetaFunction::FunctionCall::refCount() const { auto that = const_cast< FunctionCall* >( this ); +#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 ) + return reinterpret_cast< SlotObject* >( that )->ref.loadRelaxed(); +#else return reinterpret_cast< SlotObject* >( that )->ref.load(); +#endif } QskMetaFunction::QskMetaFunction() diff --git a/src/common/QskMetaInvokable.cpp b/src/common/QskMetaInvokable.cpp index 5455556d..3bd99ced 100644 --- a/src/common/QskMetaInvokable.cpp +++ b/src/common/QskMetaInvokable.cpp @@ -49,11 +49,16 @@ namespace ushort index, int nargs, int* types, void* args[], QSemaphore* semaphore = nullptr ) : QMetaCallEvent( offset, index, callFunction, nullptr, -1, - nargs, types, args, semaphore ) +#if QT_VERSION < QT_VERSION_CHECK( 5, 14, 0 ) + nargs, types, +#endif + args, semaphore ) , m_call( call ) , m_callFunction( callFunction ) , m_index( index ) { + Q_UNUSED( nargs ) + Q_UNUSED( types ) } void placeMetaCall( QObject* object ) override