Skip to content
Permalink
Browse files

GDAL 2.0 allows writing 64bit longlong integers

Fix #14411
  • Loading branch information
m-kuhn committed Mar 15, 2016
1 parent 4089ed8 commit 7de0757f56c1d1c344c638414849cbe09a9d83b3
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/qgsvectorfilewriter.cpp
@@ -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 )

0 comments on commit 7de0757

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