Skip to content

Commit c94b40c

Browse files
committed
replace QMetaType with QVariant in sampler
1 parent 53917e3 commit c94b40c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎m2l/processing/algorithms/sampler.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"""
1111
# Python imports
1212
from typing import Any, Optional
13-
from qgis.PyQt.QtCore import QMetaType
13+
from qgis.PyQt.QtCore import QVariant
1414
from osgeo import gdal
1515
import pandas as pd
1616

@@ -182,11 +182,11 @@ def processAlgorithm(
182182
dtype_str = str(dtype)
183183

184184
if dtype_str in ['float16', 'float32', 'float64']:
185-
field_type = QMetaType.Type.Double
185+
field_type = QVariant.Double
186186
elif dtype_str in ['int8', 'int16', 'int32', 'int64']:
187-
field_type = QMetaType.Type.Int
187+
field_type = QVariant.Int
188188
else:
189-
field_type = QMetaType.Type.QString
189+
field_type = QVariant.String
190190

191191
fields.append(QgsField(column_name, field_type))
192192

0 commit comments

Comments
 (0)