mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Drop QgsVectorLayer::pendingAllAttributesList()
Use QgsVectorLayer::allAttributes() instead.
This commit is contained in:
parent
068d51c3be
commit
1da17904b8
@ -2432,6 +2432,7 @@ displayExpression instead. For the map tip use mapTipTemplate() instead.
|
||||
- splitParts() now returns QgsGeometry::OperationResult enum, integer representation of returned values may have changed
|
||||
- splitFeatured() now returns QgsGeometry::OperationResult enum, integer representation of returned values may have changed
|
||||
- pendingFields() was dropped. Use fields() instead.
|
||||
- pendingAllAttributesList() was dropped. Use allAttributes() instead.
|
||||
|
||||
|
||||
QgsVectorLayerEditBuffer {#qgis_api_break_3_0_QgsVectorLayerEditBuffer}
|
||||
|
@ -1392,12 +1392,6 @@ Returns the list of fields of this layer.
|
||||
This also includes fields which have not yet been saved to the provider.
|
||||
|
||||
:return: A list of fields
|
||||
%End
|
||||
|
||||
QgsAttributeList pendingAllAttributesList() const;
|
||||
%Docstring
|
||||
Returns list of attribute indexes. i.e. a list from 0 ... fieldCount()
|
||||
Alias for attributeList()
|
||||
%End
|
||||
|
||||
QgsAttributeList attributeList() const;
|
||||
|
@ -1302,12 +1302,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
|
||||
*/
|
||||
inline QgsFields fields() const override { return mFields; }
|
||||
|
||||
/**
|
||||
* Returns list of attribute indexes. i.e. a list from 0 ... fieldCount()
|
||||
* Alias for attributeList()
|
||||
*/
|
||||
inline QgsAttributeList pendingAllAttributesList() const { return mFields.allAttributesList(); }
|
||||
|
||||
/**
|
||||
* Returns list of attribute indexes. i.e. a list from 0 ... fieldCount()
|
||||
* Alias for attributeList()
|
||||
|
@ -240,7 +240,7 @@ namespace QgsWfs
|
||||
QStringList propertyList = query.propertyList;
|
||||
|
||||
//Using pending attributes and pending fields
|
||||
QgsAttributeList attrIndexes = vlayer->pendingAllAttributesList();
|
||||
QgsAttributeList attrIndexes = vlayer->attributeList();
|
||||
bool withGeom = true;
|
||||
if ( !propertyList.isEmpty() && propertyList.first() != QStringLiteral( "*" ) )
|
||||
{
|
||||
|
@ -937,7 +937,7 @@ class TestQgsVectorLayer(unittest.TestCase, FeatureSourceTestCase):
|
||||
self.assertEqual(len(flds), 2)
|
||||
self.assertEqual(flds[0].name(), "fldint")
|
||||
self.assertEqual(flds[1].name(), "flddouble")
|
||||
self.assertEqual(layer.pendingAllAttributesList(), [0, 1])
|
||||
self.assertEqual(layer.attributeList(), [0, 1])
|
||||
|
||||
f = next(layer.getFeatures())
|
||||
attrs = f.attributes()
|
||||
@ -951,7 +951,7 @@ class TestQgsVectorLayer(unittest.TestCase, FeatureSourceTestCase):
|
||||
self.assertTrue(layer.deleteAttribute(0))
|
||||
|
||||
def checkAfterTwoDeletes():
|
||||
self.assertEqual(layer.pendingAllAttributesList(), [0])
|
||||
self.assertEqual(layer.attributeList(), [0])
|
||||
flds = layer.fields()
|
||||
# for fld in flds: print "FLD", fld.name()
|
||||
self.assertEqual(len(flds), 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user