Skip to content
Permalink
Browse files
[qt6] qRegisterMetaTypeStreamOperators, QMetaType::registerEqualsComp…
…arator, and

QMetaType::registerComparators have been removed in Qt6
  • Loading branch information
nirvn authored and nyalldawson committed Jul 18, 2021
1 parent d16d761 commit 3fd4fe90fe4d3c50cef88ab96aa97f98d6361b09
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/core/qgsapplication.cpp
@@ -281,15 +281,21 @@ void QgsApplication::init( QString profileFolder )
qRegisterMetaType<QgsRectangle>( "QgsRectangle" );
qRegisterMetaType<QgsLocatorResult>( "QgsLocatorResult" );
qRegisterMetaType<QgsProcessingModelChildParameterSource>( "QgsProcessingModelChildParameterSource" );
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// Qt6 documentation says these are not needed anymore (https://www.qt.io/blog/whats-new-in-qmetatype-qvariant) #spellok
// TODO: when tests can run against Qt6 builds, check for any regressions
qRegisterMetaTypeStreamOperators<QgsProcessingModelChildParameterSource>( "QgsProcessingModelChildParameterSource" );
#endif
qRegisterMetaType<QgsRemappingSinkDefinition>( "QgsRemappingSinkDefinition" );
qRegisterMetaType<QgsProcessingModelChildDependency>( "QgsProcessingModelChildDependency" );
qRegisterMetaType<QgsTextFormat>( "QgsTextFormat" );
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QMetaType::registerComparators<QgsProcessingModelChildDependency>();
QMetaType::registerEqualsComparator<QgsProcessingFeatureSourceDefinition>();
QMetaType::registerEqualsComparator<QgsProperty>();
QMetaType::registerEqualsComparator<QgsDateTimeRange>();
QMetaType::registerEqualsComparator<QgsDateRange>();
#endif
qRegisterMetaType<QPainter::CompositionMode>( "QPainter::CompositionMode" );
qRegisterMetaType<QgsDateTimeRange>( "QgsDateTimeRange" );
} );

0 comments on commit 3fd4fe9

Please sign in to comment.