Permalink
1 comment
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Rename QgsGeometry::geometry as QgsGeometry::get()
Because feature.geometry().geometry() is confusing, and impossible to search for in python code (e.g. is input.geometry() a QgsGeometry or a QgsAbstractGeometry?) But more importantantly: also add a const version QgsGeometry::constGet(). The non-const version is slow, since it now forces a detach to avoid corrupting geometries (since QgsGeometry is shared, it's not safe to directly access its primitive QgsAbstractGeometry and start messing with it without first detaching). This is a big risk in the 2.x API which could potentially corrupt feature geometries with unexpected outcomes. Update all uses to constGet where possible.
- Loading branch information
Showing
with
417 additions
and 357 deletions.
- +1 −1 python/core/geometry/qgsabstractgeometry.sip
- +1 −1 python/core/geometry/qgscurve.sip
- +1 −1 python/core/geometry/qgscurvepolygon.sip
- +38 −7 python/core/geometry/qgsgeometry.sip
- +1 −1 python/core/geometry/qgsgeometrycollection.sip
- +1 −1 python/core/geometry/qgspoint.sip
- +4 −4 src/analysis/network/qgsvectorlayerdirector.cpp
- +1 −1 src/analysis/processing/qgsalgorithmboundary.cpp
- +4 −4 src/analysis/processing/qgsalgorithmclip.cpp
- +2 −2 src/analysis/processing/qgsalgorithmconvexhull.cpp
- +1 −1 src/analysis/processing/qgsalgorithmdropmzvalues.cpp
- +9 −9 src/analysis/processing/qgsalgorithmextractbylocation.cpp
- +1 −1 src/analysis/processing/qgsalgorithmfixgeometries.cpp
- +2 −2 src/analysis/processing/qgsalgorithmjoinwithlines.cpp
- +2 −2 src/analysis/processing/qgsalgorithmlineintersection.cpp
- +1 −1 src/analysis/processing/qgsalgorithmmeancoordinates.cpp
- +7 −7 src/analysis/processing/qgsalgorithmsplitwithlines.cpp
- +1 −1 src/analysis/processing/qgsalgorithmtransect.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsfeaturepool.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometryanglecheck.cpp
- +6 −6 src/analysis/vector/geometry_checker/qgsgeometryareacheck.cpp
- +4 −5 src/analysis/vector/geometry_checker/qgsgeometrycheck.cpp
- +2 −2 src/analysis/vector/geometry_checker/qgsgeometrycheckerutils.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometrydegeneratepolygoncheck.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometryduplicatenodescheck.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometryfollowboundariescheck.cpp
- +2 −2 src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometryholecheck.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometrymultipartcheck.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometrysegmentlengthcheck.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometryselfintersectioncheck.cpp
- +1 −1 src/analysis/vector/geometry_checker/qgsgeometrytypecheck.cpp
- +8 −8 src/analysis/vector/qgsgeometrysnapper.cpp
- +1 −1 src/app/dwg/qgsdwgimporter.cpp
- +16 −16 src/app/nodetool/qgsnodetool.cpp
- +1 −1 src/app/nodetool/qgsselectedfeature.cpp
- +1 −1 src/app/qgsmaptooladdpart.cpp
- +1 −1 src/app/qgsselectbyformdialog.cpp
- +1 −1 src/core/dxf/qgsdxfexport.cpp
- +1 −1 src/core/expression/qgsexpression.cpp
- +44 −44 src/core/expression/qgsexpressionfunction.cpp
- +1 −1 src/core/geometry/qgsabstractgeometry.h
- +1 −1 src/core/geometry/qgscurve.cpp
- +1 −1 src/core/geometry/qgscurve.h
- +1 −1 src/core/geometry/qgscurvepolygon.cpp
- +1 −1 src/core/geometry/qgscurvepolygon.h
- +31 −25 src/core/geometry/qgsgeometry.cpp
- +31 −7 src/core/geometry/qgsgeometry.h
- +1 −1 src/core/geometry/qgsgeometrycollection.cpp
- +1 −1 src/core/geometry/qgsgeometrycollection.h
- +3 −3 src/core/geometry/qgsgeos.cpp
- +1 −1 src/core/geometry/qgsinternalgeometryengine.cpp
- +1 −1 src/core/geometry/qgspoint.cpp
- +1 −1 src/core/geometry/qgspoint.h
- +3 −3 src/core/providers/memory/qgsmemoryfeatureiterator.cpp
- +3 −3 src/core/qgsdistancearea.cpp
- +1 −1 src/core/qgsjsonutils.cpp
- +2 −2 src/core/qgsmaphittest.cpp
- +5 −5 src/core/qgsmaptopixelgeometrysimplifier.cpp
- +3 −3 src/core/qgspallabeling.cpp
- +3 −3 src/core/qgstracer.cpp
- +1 −1 src/core/qgsvectordataprovider.cpp
- +9 −9 src/core/qgsvectorfilewriter.cpp
- +2 −2 src/core/qgsvectorlayereditutils.cpp
- +3 −3 src/core/qgsvectorlayerlabelprovider.cpp
- +2 −2 src/core/symbology/qgsfillsymbollayer.cpp
- +1 −1 src/core/symbology/qgsinvertedpolygonrenderer.cpp
- +1 −1 src/core/symbology/qgspointdistancerenderer.cpp
- +15 −15 src/core/symbology/qgssymbol.cpp
- +1 −1 src/gui/qgsexpressionselectiondialog.cpp
- +1 −1 src/gui/qgsmapcanvas.cpp
- +1 −1 src/gui/qgsmaptoolcapture.cpp
- +8 −8 src/gui/qgsmaptoolidentify.cpp
- +3 −3 src/providers/grass/qgsgrassprovider.cpp
- +2 −2 src/server/services/wfs/qgswfsgetfeature.cpp
- +2 −2 src/server/services/wms/qgswmsrenderer.cpp
- +3 −3 tests/src/analysis/testqgsprocessing.cpp
- +10 −10 tests/src/app/testqgisappclipboard.cpp
- +2 −2 tests/src/core/testqgsconnectionpool.cpp
- +42 −42 tests/src/core/testqgsgeometry.cpp
- +12 −12 tests/src/core/testqgsogrutils.cpp
- +1 −1 tests/src/core/testqgspointlocator.cpp
- +24 −24 tests/src/geometry_checker/testqgsgeometrychecks.cpp
Oops, something went wrong.
This comment has been minimized.
7036106
@nyalldawson , error when WITH_3D is enabled: