Skip to content

Commit 01ebf04

Browse files
author
mhugent
committed
Use vector layer methods to test queries (instead of provider methods)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15645 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 597a601 commit 01ebf04

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/gui/qgssearchquerybuilder.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "qgssearchquerybuilder.h"
3030
#include "qgssearchstring.h"
3131
#include "qgssearchtreenode.h"
32-
#include "qgsvectordataprovider.h"
3332
#include "qgsvectorlayer.h"
3433
#include "qgslogger.h"
3534

@@ -215,13 +214,11 @@ long QgsSearchQueryBuilder::countRecords( QString searchString )
215214

216215
int count = 0;
217216
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 );
223220

224-
while ( provider->nextFeature( feat ) )
221+
while ( mLayer->nextFeature( feat ) )
225222
{
226223
if ( searchTree->checkAgainst( fields, feat ) )
227224
{

0 commit comments

Comments
 (0)