Skip to content

Commit e5366b0

Browse files
committed
python QgsField.__len__() fix; fixes PyQgsMemoryProvider and PyQgsVectorLayer test on platforms with SIP < 4.10.3
1 parent f0e6b75 commit e5366b0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

python/core/qgsfield.sip

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,13 @@ public:
127127
void remove( int fieldIdx );
128128

129129
bool isEmpty() const;
130-
int count() const /__len__/;
130+
// __len__ annotation since sip 4.10.3
131+
//int count() const /__len__/;
132+
int count() const;
133+
int __len__() const;
134+
%MethodCode
135+
sipRes = sipCpp->count();
136+
%End
131137
int size() const;
132138
//const QgsField& operator[](int i) const;
133139
//QgsField& operator[](int i);

0 commit comments

Comments
 (0)