Qt6 incompatibility fixed

This commit is contained in:
Uwe Rathmann 2020-10-28 09:05:31 +01:00
parent a81c0e4708
commit 1efbd02dda

View File

@ -317,8 +317,16 @@ void QskQml::registerTypes()
{ {
auto source = it.value(); auto source = it.value();
auto target = QskGradientStop(); auto target = QskGradientStop();
QMetaType::convert( &source, qMetaTypeId< decltype( source ) >(),
&target, qMetaTypeId< decltype( target ) >() ); const int sourceTypeId = qMetaTypeId< decltype( source ) >();
const int targetTypeId = qMetaTypeId< decltype( target ) >();
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
QMetaType::convert( QMetaType( sourceTypeId ), &source,
QMetaType( targetTypeId ), &target );
#else
QMetaType::convert( &source, sourceTypeId, &target, targetTypeId );
#endif
stops.append( target ); stops.append( target );
} }
} }