mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
fix #1707, take two
git-svn-id: http://svn.osgeo.org/qgis/trunk@11442 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
cf8d97c3bb
commit
80a9cef436
@ -1241,7 +1241,7 @@ void QgsGrassProvider::setFeatureAttributes( int layerId, int cat, QgsFeature *f
|
|||||||
if ( att != NULL )
|
if ( att != NULL )
|
||||||
{
|
{
|
||||||
QByteArray cstr( att->values[i] );
|
QByteArray cstr( att->values[i] );
|
||||||
feature->addAttribute( i, QVariant( mEncoding->toUnicode( cstr ) ) );
|
feature->addAttribute( i, convertValue( mLayers[mLayerId].fields[i].type(), mEncoding->toUnicode( cstr ) ) );
|
||||||
}
|
}
|
||||||
else /* it may happen that attributes are missing -> set to empty string */
|
else /* it may happen that attributes are missing -> set to empty string */
|
||||||
{
|
{
|
||||||
@ -1273,7 +1273,7 @@ void QgsGrassProvider::setFeatureAttributes( int layerId, int cat, QgsFeature *f
|
|||||||
if ( att != NULL )
|
if ( att != NULL )
|
||||||
{
|
{
|
||||||
QByteArray cstr( att->values[*iter] );
|
QByteArray cstr( att->values[*iter] );
|
||||||
feature->addAttribute( *iter, QVariant( mEncoding->toUnicode( cstr ) ) );
|
feature->addAttribute( *iter, convertValue( mLayers[mLayerId].fields[*iter].type(), mEncoding->toUnicode( cstr ) ) );
|
||||||
}
|
}
|
||||||
else /* it may happen that attributes are missing -> set to empty string */
|
else /* it may happen that attributes are missing -> set to empty string */
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user