mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-30 00:29:39 -05:00
Cleanup metatype conversion
This commit is contained in:
parent
b43537680c
commit
d269eb03b7
@ -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(),
|
||||
|
||||
@ -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(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user