@@ -91,8 +91,8 @@ typedef off_t grass_off_t;
91
91
typedef grass_off_t Vect_rewrite_line_function_type ( struct Map_info *, grass_off_t , int , const struct line_pnts *, const struct line_cats * );
92
92
typedef int Vect_delete_line_function_type ( struct Map_info *, grass_off_t );
93
93
#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;
96
96
97
97
static QString GRASS_KEY = " grass" ;
98
98
@@ -250,7 +250,11 @@ QgsGrassProvider::QgsGrassProvider( QString uri )
250
250
mNativeTypes
251
251
<< QgsVectorDataProvider::NativeType ( tr ( " Whole number (integer)" ), " integer" , QVariant::Int, -1 , -1 , -1 , -1 )
252
252
<< 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
254
258
// TODO:
255
259
// << QgsVectorDataProvider::NativeType( tr( "Date" ), "date", QVariant::Date, 8, 8 );
256
260
0 commit comments