Skip to content
Permalink
Browse files

[ogr] Update for GDAL 2 handle 64bit integers in add feature

  • Loading branch information
m-kuhn committed Jan 7, 2016
1 parent 80c9d02 commit ae2738e2b9b180fbf22214eff25e451d20dcd339
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -987,6 +987,13 @@ bool QgsOgrProvider::addFeature( QgsFeature& f )
OGR_F_SetFieldInteger( feature, targetAttributeId, attrVal.toInt() );
break;


#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 2000000
case OFTInteger64:
OGR_F_SetFieldInteger64( feature, targetAttributeId, attrVal.toLongLong() );
break;
#endif

case OFTReal:
OGR_F_SetFieldDouble( feature, targetAttributeId, attrVal.toDouble() );
break;
@@ -1204,6 +1211,11 @@ bool QgsOgrProvider::changeAttributeValues( const QgsChangedAttributesMap &attr_
case OFTInteger:
OGR_F_SetFieldInteger( of, f, it2->toInt() );
break;
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 2000000
case OFTInteger64:
OGR_F_SetFieldInteger64( of, f, it2->toLongLong() );
break;
#endif
case OFTReal:
OGR_F_SetFieldDouble( of, f, it2->toDouble() );
break;

0 comments on commit ae2738e

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