Skip to content
Permalink
Browse files

Avoid duplicate metatype warning noise in tests

  • Loading branch information
nyalldawson committed Jan 6, 2021
1 parent 3d23cb6 commit 949a46f799a5d93c49df768c4a17a9c5b048b738
Showing with 38 additions and 33 deletions.
  1. +38 −33 src/core/qgsapplication.cpp
@@ -221,39 +221,44 @@ void QgsApplication::init( QString profileFolder )

*sProfilePath() = profileFolder;

qRegisterMetaType<QgsGeometry::Error>( "QgsGeometry::Error" );
qRegisterMetaType<QgsProcessingFeatureSourceDefinition>( "QgsProcessingFeatureSourceDefinition" );
qRegisterMetaType<QgsProcessingOutputLayerDefinition>( "QgsProcessingOutputLayerDefinition" );
qRegisterMetaType<QgsUnitTypes::LayoutUnit>( "QgsUnitTypes::LayoutUnit" );
qRegisterMetaType<QgsFeatureId>( "QgsFeatureId" );
qRegisterMetaType<QgsFeatureIds>( "QgsFeatureIds" );
qRegisterMetaType<QgsProperty>( "QgsProperty" );
qRegisterMetaType<QgsFeatureStoreList>( "QgsFeatureStoreList" );
qRegisterMetaType<Qgis::MessageLevel>( "Qgis::MessageLevel" );
qRegisterMetaType<QgsReferencedRectangle>( "QgsReferencedRectangle" );
qRegisterMetaType<QgsReferencedPointXY>( "QgsReferencedPointXY" );
qRegisterMetaType<QgsReferencedGeometry>( "QgsReferencedGeometry" );
qRegisterMetaType<QgsLayoutRenderContext::Flags>( "QgsLayoutRenderContext::Flags" );
qRegisterMetaType<QgsStyle::StyleEntity>( "QgsStyle::StyleEntity" );
qRegisterMetaType<QgsCoordinateReferenceSystem>( "QgsCoordinateReferenceSystem" );
qRegisterMetaType<QgsAuthManager::MessageLevel>( "QgsAuthManager::MessageLevel" );
qRegisterMetaType<QgsNetworkRequestParameters>( "QgsNetworkRequestParameters" );
qRegisterMetaType<QgsNetworkReplyContent>( "QgsNetworkReplyContent" );
qRegisterMetaType<QgsGeometry>( "QgsGeometry" );
qRegisterMetaType<QgsDatumTransform::GridDetails>( "QgsDatumTransform::GridDetails" );
qRegisterMetaType<QgsDatumTransform::TransformDetails>( "QgsDatumTransform::TransformDetails" );
qRegisterMetaType<QgsNewsFeedParser::Entry>( "QgsNewsFeedParser::Entry" );
qRegisterMetaType<QgsRectangle>( "QgsRectangle" );
qRegisterMetaType<QgsLocatorResult>( "QgsLocatorResult" );
qRegisterMetaType<QgsProcessingModelChildParameterSource>( "QgsProcessingModelChildParameterSource" );
qRegisterMetaTypeStreamOperators<QgsProcessingModelChildParameterSource>( "QgsProcessingModelChildParameterSource" );
qRegisterMetaType<QgsRemappingSinkDefinition>( "QgsRemappingSinkDefinition" );
qRegisterMetaType<QgsProcessingModelChildDependency>( "QgsProcessingModelChildDependency" );
qRegisterMetaType<QgsTextFormat>( "QgsTextFormat" );
QMetaType::registerComparators<QgsProcessingModelChildDependency>();
QMetaType::registerEqualsComparator<QgsProcessingFeatureSourceDefinition>();
QMetaType::registerEqualsComparator<QgsProperty>();
qRegisterMetaType<QPainter::CompositionMode>( "QPainter::CompositionMode" );
static std::once_flag sMetaTypesRegistered;
std::call_once( sMetaTypesRegistered, []
{
qRegisterMetaType<QgsGeometry::Error>( "QgsGeometry::Error" );
qRegisterMetaType<QgsProcessingFeatureSourceDefinition>( "QgsProcessingFeatureSourceDefinition" );
qRegisterMetaType<QgsProcessingOutputLayerDefinition>( "QgsProcessingOutputLayerDefinition" );
qRegisterMetaType<QgsUnitTypes::LayoutUnit>( "QgsUnitTypes::LayoutUnit" );
qRegisterMetaType<QgsFeatureId>( "QgsFeatureId" );
qRegisterMetaType<QgsFeatureIds>( "QgsFeatureIds" );
qRegisterMetaType<QgsProperty>( "QgsProperty" );
qRegisterMetaType<QgsFeatureStoreList>( "QgsFeatureStoreList" );
qRegisterMetaType<Qgis::MessageLevel>( "Qgis::MessageLevel" );
qRegisterMetaType<QgsReferencedRectangle>( "QgsReferencedRectangle" );
qRegisterMetaType<QgsReferencedPointXY>( "QgsReferencedPointXY" );
qRegisterMetaType<QgsReferencedGeometry>( "QgsReferencedGeometry" );
qRegisterMetaType<QgsLayoutRenderContext::Flags>( "QgsLayoutRenderContext::Flags" );
qRegisterMetaType<QgsStyle::StyleEntity>( "QgsStyle::StyleEntity" );
qRegisterMetaType<QgsCoordinateReferenceSystem>( "QgsCoordinateReferenceSystem" );
qRegisterMetaType<QgsAuthManager::MessageLevel>( "QgsAuthManager::MessageLevel" );
qRegisterMetaType<QgsNetworkRequestParameters>( "QgsNetworkRequestParameters" );
qRegisterMetaType<QgsNetworkReplyContent>( "QgsNetworkReplyContent" );
qRegisterMetaType<QgsGeometry>( "QgsGeometry" );
qRegisterMetaType<QgsDatumTransform::GridDetails>( "QgsDatumTransform::GridDetails" );
qRegisterMetaType<QgsDatumTransform::TransformDetails>( "QgsDatumTransform::TransformDetails" );
qRegisterMetaType<QgsNewsFeedParser::Entry>( "QgsNewsFeedParser::Entry" );
qRegisterMetaType<QgsRectangle>( "QgsRectangle" );
qRegisterMetaType<QgsLocatorResult>( "QgsLocatorResult" );
qRegisterMetaType<QgsProcessingModelChildParameterSource>( "QgsProcessingModelChildParameterSource" );
qRegisterMetaTypeStreamOperators<QgsProcessingModelChildParameterSource>( "QgsProcessingModelChildParameterSource" );
qRegisterMetaType<QgsRemappingSinkDefinition>( "QgsRemappingSinkDefinition" );
qRegisterMetaType<QgsProcessingModelChildDependency>( "QgsProcessingModelChildDependency" );
qRegisterMetaType<QgsTextFormat>( "QgsTextFormat" );
QMetaType::registerComparators<QgsProcessingModelChildDependency>();
QMetaType::registerEqualsComparator<QgsProcessingFeatureSourceDefinition>();
QMetaType::registerEqualsComparator<QgsProperty>();
qRegisterMetaType<QPainter::CompositionMode>( "QPainter::CompositionMode" );
qRegisterMetaType<QgsDateTimeRange>( "QgsDateTimeRange" );
} );

( void ) resolvePkgPath();

0 comments on commit 949a46f

Please sign in to comment.
You can’t perform that action at this time.