Skip to content

Commit 5cba125

Browse files
committed
temporary hack to get half working shp suport. opening of a file works, writing only if there are no string type attributes.
1 parent 096808e commit 5cba125

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/providers/ogr/qgsogrprovider.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,18 @@ void QgsOgrProvider::loadFields()
413413

414414
mAttributeFields.insert(
415415
i, QgsField(
416-
mEncoding->toUnicode( OGR_Fld_GetNameRef( fldDef ) ), varType,
417-
mEncoding->toUnicode( OGR_GetFieldTypeName( ogrType ) ),
416+
//TODO: fix this hack
417+
#ifdef ANDROID
418+
OGR_Fld_GetNameRef( fldDef ),
419+
#else
420+
mEncoding->toUnicode( OGR_Fld_GetNameRef( fldDef ) ),
421+
#endif
422+
varType,
423+
#ifdef ANDROID
424+
OGR_GetFieldTypeName( ogrType ),
425+
#else
426+
mEncoding->toUnicode( OGR_GetFieldTypeName( ogrType ) ),
427+
#endif
418428
OGR_Fld_GetWidth( fldDef ),
419429
OGR_Fld_GetPrecision( fldDef ) ) );
420430
}

0 commit comments

Comments
 (0)