diff --git a/src/gui/processing/qgsprocessingaggregatewidgetwrapper.cpp b/src/gui/processing/qgsprocessingaggregatewidgetwrapper.cpp index 522fe86d564..d50f53bbc56 100644 --- a/src/gui/processing/qgsprocessingaggregatewidgetwrapper.cpp +++ b/src/gui/processing/qgsprocessingaggregatewidgetwrapper.cpp @@ -130,8 +130,8 @@ void QgsProcessingAggregatePanelWidget::setValue( const QVariant &value ) { const QVariantMap map = field.toMap(); const QgsField f( map.value( QStringLiteral( "name" ) ).toString(), - static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), QgsVariantUtils::createNullVariant( QMetaType::Type::UnknownType ) ).toInt() ), - map.value( QStringLiteral( "type_name" ), QVariant::typeToName( static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), QgsVariantUtils::createNullVariant( QMetaType::Type::UnknownType ) ).toInt() ) ) ).toString(), + static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), static_cast< int >( QMetaType::Type::UnknownType ) ).toInt() ), + map.value( QStringLiteral( "type_name" ), QVariant::typeToName( static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), static_cast< int >( QMetaType::Type::UnknownType ) ).toInt() ) ) ).toString(), map.value( QStringLiteral( "length" ), 0 ).toInt(), map.value( QStringLiteral( "precision" ), 0 ).toInt(), QString(), diff --git a/src/gui/processing/qgsprocessingfieldmapwidgetwrapper.cpp b/src/gui/processing/qgsprocessingfieldmapwidgetwrapper.cpp index a05b2d8bef3..375d8baf1e6 100644 --- a/src/gui/processing/qgsprocessingfieldmapwidgetwrapper.cpp +++ b/src/gui/processing/qgsprocessingfieldmapwidgetwrapper.cpp @@ -133,8 +133,8 @@ void QgsProcessingFieldMapPanelWidget::setValue( const QVariant &value ) { const QVariantMap map = field.toMap(); QgsField f( map.value( QStringLiteral( "name" ) ).toString(), - static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), QgsVariantUtils::createNullVariant( QMetaType::Type::UnknownType ) ).toInt() ), - map.value( QStringLiteral( "type_name" ), QVariant::typeToName( static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), QgsVariantUtils::createNullVariant( QMetaType::Type::UnknownType ) ).toInt() ) ) ).toString(), + static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), static_cast< int >( QMetaType::Type::UnknownType ) ).toInt() ), + map.value( QStringLiteral( "type_name" ), QVariant::typeToName( static_cast< QMetaType::Type >( map.value( QStringLiteral( "type" ), static_cast< int >( QMetaType::Type::UnknownType ) ).toInt() ) ) ).toString(), map.value( QStringLiteral( "length" ), 0 ).toInt(), map.value( QStringLiteral( "precision" ), 0 ).toInt(), QString(),