Skip to content

Commit afdf4e1

Browse files
committedOct 15, 2015
[GRASS] use text type with sqlite
1 parent fb76501 commit afdf4e1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

‎src/providers/grass/qgsgrassprovider.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ typedef off_t grass_off_t;
9191
typedef grass_off_t Vect_rewrite_line_function_type( struct Map_info *, grass_off_t, int, const struct line_pnts *, const struct line_cats * );
9292
typedef int Vect_delete_line_function_type( struct Map_info *, grass_off_t );
9393
#endif
94-
Vect_rewrite_line_function_type *Vect_rewrite_line_function_pointer = (Vect_rewrite_line_function_type *)Vect_rewrite_line;
95-
Vect_delete_line_function_type *Vect_delete_line_function_pointer = (Vect_delete_line_function_type *)Vect_delete_line;
94+
Vect_rewrite_line_function_type *Vect_rewrite_line_function_pointer = ( Vect_rewrite_line_function_type * )Vect_rewrite_line;
95+
Vect_delete_line_function_type *Vect_delete_line_function_pointer = ( Vect_delete_line_function_type * )Vect_delete_line;
9696

9797
static QString GRASS_KEY = "grass";
9898

@@ -250,7 +250,11 @@ QgsGrassProvider::QgsGrassProvider( QString uri )
250250
mNativeTypes
251251
<< QgsVectorDataProvider::NativeType( tr( "Whole number (integer)" ), "integer", QVariant::Int, -1, -1, -1, -1 )
252252
<< QgsVectorDataProvider::NativeType( tr( "Decimal number (real)" ), "double precision", QVariant::Double, -1, -1, -1, -1 )
253-
<< QgsVectorDataProvider::NativeType( tr( "Text, limited variable length (varchar)" ), "varchar", QVariant::String, 1, -1, -1, -1 );
253+
#if GRASS_VERSION_MAJOR < 7
254+
<< QgsVectorDataProvider::NativeType( tr( "Text, limited variable length (varchar)" ), "varchar", QVariant::String, 1, 255, -1, -1 );
255+
#else
256+
<< QgsVectorDataProvider::NativeType( tr( "Text" ), "text", QVariant::String );
257+
#endif
254258
// TODO:
255259
// << QgsVectorDataProvider::NativeType( tr( "Date" ), "date", QVariant::Date, 8, 8 );
256260

0 commit comments

Comments
 (0)
Please sign in to comment.