From 372751a13dd17e4ad40db0782c08bb978598a882 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Tue, 21 Sep 2021 10:28:13 +0200 Subject: [PATCH] Qt 6.2 workarounds --- qmlexport/QskQml.cpp | 3 +++ src/controls/QskQuickItem.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/qmlexport/QskQml.cpp b/qmlexport/QskQml.cpp index 6157208f..75a05823 100644 --- a/qmlexport/QskQml.cpp +++ b/qmlexport/QskQml.cpp @@ -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 >( diff --git a/src/controls/QskQuickItem.cpp b/src/controls/QskQuickItem.cpp index f6526d8e..cef872ce 100644 --- a/src/controls/QskQuickItem.cpp +++ b/src/controls/QskQuickItem.cpp @@ -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 QSK_QT_PRIVATE_END #endif