File tree Expand file tree Collapse file tree 10 files changed +60
-0
lines changed
python/core/auto_generated Expand file tree Collapse file tree 10 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ if the feature count is unknown.
69
69
sipRes = sipCpp->featureCount();
70
70
%End
71
71
72
+ //! Ensures that bool(obj) returns true (otherwise __len__() would be used)
73
+ int __bool__() const;
74
+ %MethodCode
75
+ sipRes = true;
76
+ %End
77
+
72
78
virtual long featureCount() const = 0;
73
79
%Docstring
74
80
Returns the number of features contained in the source, or -1
Original file line number Diff line number Diff line change @@ -74,6 +74,12 @@ Returns the number of features contained in the store.
74
74
sipRes = sipCpp->count();
75
75
%End
76
76
77
+ //! Ensures that bool(obj) returns true (otherwise __len__() would be used)
78
+ int __bool__() const;
79
+ %MethodCode
80
+ sipRes = true;
81
+ %End
82
+
77
83
QgsFeatureList features() const;
78
84
%Docstring
79
85
Returns the list of features contained in the store.
Original file line number Diff line number Diff line change @@ -103,6 +103,12 @@ Returns number of items
103
103
sipRes = sipCpp->count();
104
104
%End
105
105
106
+ //! Ensures that bool(obj) returns true (otherwise __len__() would be used)
107
+ int __bool__() const;
108
+ %MethodCode
109
+ sipRes = true;
110
+ %End
111
+
106
112
int size() const;
107
113
%Docstring
108
114
Returns number of items
Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ Returns the number of layers contained in the store.
46
46
sipRes = sipCpp->count();
47
47
%End
48
48
49
+ //! Ensures that bool(obj) returns true (otherwise __len__() would be used)
50
+ int __bool__() const;
51
+ %MethodCode
52
+ sipRes = true;
53
+ %End
54
+
49
55
QgsMapLayer *mapLayer( const QString &id ) const;
50
56
%Docstring
51
57
Retrieve a pointer to a layer by layer ``id``.
Original file line number Diff line number Diff line change @@ -221,6 +221,12 @@ if the feature count is unknown.
221
221
sipRes = sipCpp->featureCount();
222
222
%End
223
223
224
+ //! Ensures that bool(obj) returns true (otherwise __len__() would be used)
225
+ int __bool__() const;
226
+ %MethodCode
227
+ sipRes = true;
228
+ %End
229
+
224
230
long featureCount() const;
225
231
%Docstring
226
232
Returns the number of features contained in the source, or -1
Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ class CORE_EXPORT QgsFeatureSource
93
93
% MethodCode
94
94
sipRes = sipCpp->featureCount ();
95
95
% End
96
+
97
+ // ! Ensures that bool(obj) returns true (otherwise __len__() would be used)
98
+ int __bool__ () const ;
99
+ % MethodCode
100
+ sipRes = true ;
101
+ % End
96
102
#endif
97
103
98
104
/* *
Original file line number Diff line number Diff line change @@ -79,6 +79,12 @@ class CORE_EXPORT QgsFeatureStore : public QgsFeatureSink
79
79
% MethodCode
80
80
sipRes = sipCpp->count ();
81
81
% End
82
+
83
+ // ! Ensures that bool(obj) returns true (otherwise __len__() would be used)
84
+ int __bool__ () const ;
85
+ % MethodCode
86
+ sipRes = true ;
87
+ % End
82
88
#endif
83
89
84
90
/* *
Original file line number Diff line number Diff line change @@ -133,6 +133,12 @@ class CORE_EXPORT QgsFields
133
133
% MethodCode
134
134
sipRes = sipCpp->count ();
135
135
% End
136
+
137
+ // ! Ensures that bool(obj) returns true (otherwise __len__() would be used)
138
+ int __bool__ () const ;
139
+ % MethodCode
140
+ sipRes = true ;
141
+ % End
136
142
#endif
137
143
138
144
// ! Returns number of items
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ class CORE_EXPORT QgsMapLayerStore : public QObject
59
59
% MethodCode
60
60
sipRes = sipCpp->count ();
61
61
% End
62
+
63
+ // ! Ensures that bool(obj) returns true (otherwise __len__() would be used)
64
+ int __bool__ () const ;
65
+ % MethodCode
66
+ sipRes = true ;
67
+ % End
62
68
#endif
63
69
64
70
/* *
Original file line number Diff line number Diff line change @@ -276,6 +276,12 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject
276
276
% MethodCode
277
277
sipRes = sipCpp->featureCount ();
278
278
% End
279
+
280
+ // ! Ensures that bool(obj) returns true (otherwise __len__() would be used)
281
+ int __bool__ () const ;
282
+ % MethodCode
283
+ sipRes = true ;
284
+ % End
279
285
#endif
280
286
281
287
/* *
You can’t perform that action at this time.
0 commit comments