qgis / qgis4.0_api

Tracker for QGIS 4.0 API related issues and developer discussion
3 stars 1 forks source link

Make QgsVectorLayer and QgsVectorDataProvider more const-correct #48

Closed nyalldawson closed 7 years ago

nyalldawson commented 8 years ago

There's a bunch of methods in QgsVectorLayer and QgsVectorDataProvider which are not marked as const, but should be: eg:

(and their QgsVectorDataProvider counterparts)

This would also require const correctness of QgsVectorLayerEditBuffer - some methods such as QgsVectorLayerEditBuffer::addedFeatures return a const list but are not marked const themselves.

Some of this could possibly be fixed pre 3.0 (eg the edit buffer changes), but the required provider changes constitute an api break

nyalldawson commented 7 years ago

Fixed in https://github.com/qgis/QGIS/commit/fe4fa419f8b4e5f89468becdd6a1f08a77fcf877, https://github.com/qgis/QGIS/commit/2d50895d043f79cec6ce9e5eb644718b1f8fa2f0