Skip to content
Permalink
Browse files

[spatialite] uniqueValues() return values instead of strings

  • Loading branch information
m-kuhn committed Aug 28, 2013
1 parent cba57fa commit ddcb7cc39badb4ef14c3106f46393dbd9b464067
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -3456,16 +3456,16 @@ void QgsSpatiaLiteProvider::uniqueValues( int index, QList < QVariant > &uniqueV
switch ( sqlite3_column_type( stmt, 0 ) )
{
case SQLITE_INTEGER:
uniqueValues.append( QString( "%1" ).arg( sqlite3_column_int( stmt, 0 ) ) );
uniqueValues.append( QVariant( sqlite3_column_int( stmt, 0 ) ) );
break;
case SQLITE_FLOAT:
uniqueValues.append( QString( "%1" ).arg( sqlite3_column_double( stmt, 0 ) ) );
uniqueValues.append( QVariant( sqlite3_column_double( stmt, 0 ) ) );
break;
case SQLITE_TEXT:
uniqueValues.append( QString::fromUtf8(( const char * ) sqlite3_column_text( stmt, 0 ) ) );
uniqueValues.append( QVariant( QString::fromUtf8(( const char * ) sqlite3_column_text( stmt, 0 ) ) ) );
break;
default:
uniqueValues.append( "" );
uniqueValues.append( QVariant( attributeFields[index].type() ) );
break;
}
}

0 comments on commit ddcb7cc

Please sign in to comment.
You can’t perform that action at this time.