Qt 6.2 workarounds

This commit is contained in:
Uwe Rathmann 2021-09-21 10:28:13 +02:00
parent f9ca36443e
commit 372751a13d
2 changed files with 10 additions and 0 deletions

View File

@ -226,8 +226,11 @@ void QskQml::registerTypes()
}
);
#if QT_VERSION < QT_VERSION_CHECK( 6, 2, 0 )
// how to do this with >= 6.2 TODO ...
QQmlMetaType::registerCustomStringConverter( qMetaTypeId< QskMargins >(),
[]( const QString& s ) { return QVariant::fromValue( QskMargins( s.toDouble() ) ); } );
#endif
// Support QskSizePolicy in QML user properties
QMetaType::registerConverter< QJSValue, QskSizePolicy >(

View File

@ -16,6 +16,13 @@
#if defined( QT_DEBUG )
QSK_QT_PRIVATE_BEGIN
#if QT_VERSION >= QT_VERSION_CHECK( 6, 2, 0 )
#ifndef emit
// qvariantanimation_p.h needs it
#define emit
#endif
#endif
#include <private/qquickpositioners_p.h>
QSK_QT_PRIVATE_END
#endif