[processing] Fix deprecated QgsField constructor and use QMetaType.Type in place of QVariant in various qgis:
algorithms (Fix #57920)
#58756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #57920 for various processing algorithms:
"Check validity"
qgis:checkvalidity
"Climb along line"
qgis:climbalongline
"Add geometry attributes"
qgis:exportaddgeometrycolumns
"Advanced Python field calculator"
qgis:advancedpythonfieldcalculator
"Find projection"
qgis:findprojection
"Distance to nearest hub (line to hub)"
qgis:distancetonearesthublinetohub
"Distance to nearest hub (points)"
qgis:distancetonearesthubpoints
"Concave hull (k-nearest neighbor)"
qgis:knearestconcavehull
"Minimum bounding geometry"
qgis:minimumboundinggeometry
"Distance matrix"
qgis:distancematrix
"Generate points (pixel centroids) along line"
qgis:generatepointspixelcentroidsalongline
"Random points along line"
qgis:randompointsalongline
"Random points in layer bounds"
qgis:randompointsinlayerbounds
"Random points inside polygons"
qgis:randompointsinsidepolygons
"Regular points"
qgis:regularpoints
"Statistics by categories"
qgis:statisticsbycategories
"Text to float"
qgis:texttofloat
"Topological coloring"
qgis:topologicalcoloring
"Select by attribute"
qgis:selectbyattribute
was also updated to use QMetaType.Type in place of QVariant, although not used in a QgsField constructor.Not to be backported to 3.34.
Ref: #57272.
Side note: while fixing the code of the "Advanced Python field calculator" algorithm I noticed that, years ago, there was a shift from
Int
toLongLong
field type 0ac0249 (#5143) by @m-kuhn, but more recently the field type has been reverted toInt
fromLongLong
835fe14 (#47094) by @nirvn. Is it intentional or an oversight?