File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 29
29
#include " qgssearchquerybuilder.h"
30
30
#include " qgssearchstring.h"
31
31
#include " qgssearchtreenode.h"
32
- #include " qgsvectordataprovider.h"
33
32
#include " qgsvectorlayer.h"
34
33
#include " qgslogger.h"
35
34
@@ -215,13 +214,11 @@ long QgsSearchQueryBuilder::countRecords( QString searchString )
215
214
216
215
int count = 0 ;
217
216
QgsFeature feat;
218
- QgsVectorDataProvider* provider = mLayer ->dataProvider ();
219
- const QgsFieldMap& fields = provider->fields ();
220
- QgsAttributeList allAttributes = provider->attributeIndexes ();
221
-
222
- provider->select ( allAttributes, QgsRectangle (), fetchGeom );
217
+ const QgsFieldMap& fields = mLayer ->pendingFields ();
218
+ QgsAttributeList allAttributes = mLayer ->pendingAllAttributesList ();
219
+ mLayer ->select ( allAttributes, QgsRectangle (), fetchGeom );
223
220
224
- while ( provider ->nextFeature ( feat ) )
221
+ while ( mLayer ->nextFeature ( feat ) )
225
222
{
226
223
if ( searchTree->checkAgainst ( fields, feat ) )
227
224
{
You can’t perform that action at this time.
0 commit comments