[Qgis-developer] Remove editing functions from QgsVectorLayer

Martin Dobias wonder.sk at gmail.com
Mon Apr 15 15:29:51 PDT 2013


Hi

right now, all the basic vector layer editing operations are
implemented within QgsVectorLayerEditBuffer class and the "advanced"
operations (composed of one or more basic operations) are implemented
in QgsVectorLayerEditUtils class. The main class, QgsVectorLayer still
contains editing functions and only proxies them to these new classes.

I think we should probably remove those editing functions from
QgsVectorLayer. The advantage should be two-fold:
1. fewer functions -> easier to grasp and understand the class
2. sometimes people try to call editing functions without editing mode
being turned on: these issues should go away since they would quickly
find out that QgsVectorLayerEditBuffer does not exist if editing is
not turned on.

>From the editing functions we would keep only startEditing(),
commitChanges(), commitErrors(), rollback() as they take care of edit
buffer management. The rest of the functions (addFeatures(),
changeGeometry() etc) would go to /dev/null.

Any comments / suggestions / objections?

Regards
Martin


More information about the Qgis-developer mailing list