@@ -241,8 +241,8 @@ class QgsFeature
241
241
*/
242
242
void setFeatureId( qint64 id );
243
243
244
- const QgsAttributes& attributes() const;
245
- //QgsAttributes& attributes();
244
+ QgsAttributes attributes() const;
245
+
246
246
void setAttributes( const QgsAttributes& attrs );
247
247
248
248
/**
@@ -312,33 +312,45 @@ class QgsFeature
312
312
313
313
/**
314
314
* Get the geometry object associated with this feature
315
+ *
316
+ * It is possible to modify the geometry in place but this will
317
+ * be removed in 3.0 and therefore @link setGeometry @endlink should be called explicitly.
318
+ *
319
+ * @note will be modified to return by value in QGIS 3.0: `QgsGeometry geometry() const;`
315
320
*/
316
- QgsGeometry* geometry() const ;
321
+ QgsGeometry* geometry();
317
322
318
- /** Gets a const pointer to the geometry object associated with this feature
323
+ /** Gets a const pointer to the geometry object associated with this feature.
324
+ * @note this is a temporary method for 2.x release cycle. Will be removed in QGIS 3.0.
319
325
* @note added in QGIS 2.9
326
+ * @note will be removed in QGIS 3.0
320
327
*/
321
328
const QgsGeometry* constGeometry() const;
322
329
323
330
/**
324
331
* Get the geometry object associated with this feature
325
332
* The caller assumes responsibility for the QgsGeometry*'s destruction.
333
+ * @deprecated will be removed in QGIS 3.0
326
334
*/
327
- QgsGeometry *geometryAndOwnership() /Factory/;
335
+ QgsGeometry *geometryAndOwnership() /Factory,Deprecated /;
328
336
329
337
/** Set this feature's geometry from another QgsGeometry object (deep copy)
330
338
*/
331
339
void setGeometry( const QgsGeometry& geom );
332
340
333
341
/** Set this feature's geometry (takes geometry ownership)
342
+ *
334
343
* @note not available in python bindings
344
+ * @deprecated will be removed in QGIS 3.0
335
345
*/
336
346
// void setGeometry( QgsGeometry* geom /Transfer/ );
337
347
338
348
/**
339
349
* Set this feature's geometry from WKB
340
350
*
341
351
* This feature assumes responsibility for destroying geom.
352
+ *
353
+ * @deprecated will be removed in QGIS 3.0
342
354
*/
343
355
void setGeometryAndOwnership( unsigned char * geom /Transfer/, size_t length );
344
356
0 commit comments