Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GDAL 2.0 allows writing 64bit longlong integers
Fix #14411
  • Loading branch information
m-kuhn committed Mar 15, 2016
1 parent 25ac01a commit e135699
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/qgsvectorfilewriter.cpp
Expand Up @@ -362,12 +362,19 @@ void QgsVectorFileWriter::init( QString vectorFileName, QString fileEncoding, co

switch ( attrField.type() )
{
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM < 2000000
case QVariant::LongLong:
ogrType = OFTString;
ogrWidth = ogrWidth > 0 && ogrWidth <= 21 ? ogrWidth : 21;
ogrPrecision = -1;
break;

#else
case QVariant::LongLong:
ogrType = OFTInteger64;
ogrWidth = ogrWidth > 0 && ogrWidth <= 20 ? ogrWidth : 20;
ogrPrecision = 0;
break;
#endif
case QVariant::String:
ogrType = OFTString;
if ( ogrWidth <= 0 || ogrWidth > 255 )
Expand Down

0 comments on commit e135699

Please sign in to comment.