Bug report #20156

QgsVectorFileWriter creates new fields with field type Integer64 instead of Integer.

Added by Evangelos Rozos about 6 years ago.

Status:Open
Priority:Low
Assignee:-
Category:Vectors
Affected QGIS version:3.2.3 Regression?:No
Operating System:Windows 10 64 bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27977

Description

The data type of the third argument of QgsVectorFileWriter is QgsFields [1], a container of fields. Suppose an entry (data type of entries is Qgsfield, see [2]) of this container has QVariant Type = QVariant.Int. Then, the type of corresponding field in the created attribute table will be QVariant.LongLong [3], instead of Integer.

[1] https://qgis.org/api/classQgsVectorFileWriter.html
[2] https://qgis.org/api/classQgsField.html
[3] http://pyqt.sourceforge.net/Docs/PyQt4/qvariant.html

Also available in: Atom PDF