Skip to content

Commit ddcb7cc

Browse files
committedAug 28, 2013
[spatialite] uniqueValues() return values instead of strings
1 parent cba57fa commit ddcb7cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/providers/spatialite/qgsspatialiteprovider.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3456,16 +3456,16 @@ void QgsSpatiaLiteProvider::uniqueValues( int index, QList < QVariant > &uniqueV
34563456
switch ( sqlite3_column_type( stmt, 0 ) )
34573457
{
34583458
case SQLITE_INTEGER:
3459-
uniqueValues.append( QString( "%1" ).arg( sqlite3_column_int( stmt, 0 ) ) );
3459+
uniqueValues.append( QVariant( sqlite3_column_int( stmt, 0 ) ) );
34603460
break;
34613461
case SQLITE_FLOAT:
3462-
uniqueValues.append( QString( "%1" ).arg( sqlite3_column_double( stmt, 0 ) ) );
3462+
uniqueValues.append( QVariant( sqlite3_column_double( stmt, 0 ) ) );
34633463
break;
34643464
case SQLITE_TEXT:
3465-
uniqueValues.append( QString::fromUtf8(( const char * ) sqlite3_column_text( stmt, 0 ) ) );
3465+
uniqueValues.append( QVariant( QString::fromUtf8(( const char * ) sqlite3_column_text( stmt, 0 ) ) ) );
34663466
break;
34673467
default:
3468-
uniqueValues.append( "" );
3468+
uniqueValues.append( QVariant( attributeFields[index].type() ) );
34693469
break;
34703470
}
34713471
}

0 commit comments

Comments
 (0)
Please sign in to comment.