mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
manual fix providers
This commit is contained in:
parent
ee260f8bde
commit
a499a91900
@ -1353,7 +1353,7 @@ bool QgsMssqlProvider::addFeatures( QgsFeatureList &flist, Flags flags )
|
||||
if ( type == QMetaType::Type::QDate || type == QMetaType::Type::QDateTime )
|
||||
query.addBindValue( QgsVariantUtils::createVariant( QMetaType::Type::QString ) );
|
||||
else
|
||||
query.addBindValue( QVariant( type ) );
|
||||
query.addBindValue( QgsVariantUtils::createVariant( type ) );
|
||||
}
|
||||
else if ( type == QMetaType::Type::Int )
|
||||
{
|
||||
@ -1644,7 +1644,7 @@ bool QgsMssqlProvider::changeAttributeValues( const QgsChangedAttributesMap &att
|
||||
if ( type == QMetaType::Type::QDate || type == QMetaType::Type::QDateTime )
|
||||
query.addBindValue( QgsVariantUtils::createVariant( QMetaType::Type::QString ) );
|
||||
else
|
||||
query.addBindValue( QVariant( type ) );
|
||||
query.addBindValue( QgsVariantUtils::createVariant( type ) );
|
||||
}
|
||||
else if ( type == QMetaType::Type::Int )
|
||||
{
|
||||
|
||||
@ -1423,7 +1423,7 @@ void QgsOapifFeatureDownloaderImpl::run( bool serializeFeatures, long long maxFe
|
||||
const auto dstFieldType = dstFields.at( j ).type();
|
||||
if ( QgsVariantUtils::isNull( v ) )
|
||||
dstFeat.setAttribute( j, QgsVariantUtils::createVariant( dstFieldType ) );
|
||||
else if ( QgsWFSUtils::isCompatibleType( v.userType(), dstFieldType ) )
|
||||
else if ( QgsWFSUtils::isCompatibleType( static_cast<QMetaType::Type>( v.userType() ), dstFieldType ) )
|
||||
dstFeat.setAttribute( j, v );
|
||||
else
|
||||
dstFeat.setAttribute( j, QgsVectorDataProvider::convertValue( dstFieldType, v.toString() ) );
|
||||
|
||||
@ -941,7 +941,7 @@ void QgsBackgroundCachedFeatureIterator::copyFeature( const QgsFeature &srcFeatu
|
||||
const QVariant &v = srcFeature.attributes().value( idx );
|
||||
const QMetaType::Type fieldType = fields.at( i ).type();
|
||||
if ( QgsVariantUtils::isNull( v ) )
|
||||
dstFeature.setAttribute( i, QVariant( fieldType ) );
|
||||
dstFeature.setAttribute( i, QgsVariantUtils::createVariant( fieldType ) );
|
||||
else if ( QgsWFSUtils::isCompatibleType( static_cast<QMetaType::Type>( v.userType() ), fieldType ) )
|
||||
dstFeature.setAttribute( i, v );
|
||||
else if ( fieldType == QMetaType::Type::QDateTime && !QgsVariantUtils::isNull( v ) )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user