mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
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.