Skip to content

Commit 80a9cef

Browse files
author
jef
committed
fix #1707, take two
git-svn-id: http://svn.osgeo.org/qgis/trunk@11442 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent cf8d97c commit 80a9cef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/grass/qgsgrassprovider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ void QgsGrassProvider::setFeatureAttributes( int layerId, int cat, QgsFeature *f
12411241
if ( att != NULL )
12421242
{
12431243
QByteArray cstr( att->values[i] );
1244-
feature->addAttribute( i, QVariant( mEncoding->toUnicode( cstr ) ) );
1244+
feature->addAttribute( i, convertValue( mLayers[mLayerId].fields[i].type(), mEncoding->toUnicode( cstr ) ) );
12451245
}
12461246
else /* it may happen that attributes are missing -> set to empty string */
12471247
{
@@ -1273,7 +1273,7 @@ void QgsGrassProvider::setFeatureAttributes( int layerId, int cat, QgsFeature *f
12731273
if ( att != NULL )
12741274
{
12751275
QByteArray cstr( att->values[*iter] );
1276-
feature->addAttribute( *iter, QVariant( mEncoding->toUnicode( cstr ) ) );
1276+
feature->addAttribute( *iter, convertValue( mLayers[mLayerId].fields[*iter].type(), mEncoding->toUnicode( cstr ) ) );
12771277
}
12781278
else /* it may happen that attributes are missing -> set to empty string */
12791279
{

0 commit comments

Comments
 (0)