Skip to content

Commit

Permalink
correctly set feature request, prefix now set to 'af'
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Sep 7, 2018
1 parent 2aa280e commit 53c3150
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/app/locator/qgsinbuiltlocatorfilters.cpp
Expand Up @@ -335,7 +335,9 @@ void QgsAllLayersFeaturesLocatorFilter::prepare( const QString &string, const Qg
expression.prepare( &context );

QgsFeatureRequest req;
req.setFlags( QgsFeatureRequest::NoGeometry );
req.setSubsetOfAttributes( expression.referencedAttributeIndexes( layer->fields() ).toList() );
if ( !expression.needsGeometry() )
req.setFlags( QgsFeatureRequest::NoGeometry );
req.setFilterExpression( QStringLiteral( "%1 ILIKE '%%2%'" )
.arg( layer->displayExpression() )
.arg( string ) );
Expand Down
2 changes: 1 addition & 1 deletion src/app/locator/qgsinbuiltlocatorfilters.h
Expand Up @@ -134,7 +134,7 @@ class QgsAllLayersFeaturesLocatorFilter : public QgsLocatorFilter
QString name() const override { return QStringLiteral( "allfeatures" ); }
QString displayName() const override { return tr( "Features In All Layers" ); }
Priority priority() const override { return Medium; }
QString prefix() const override { return QStringLiteral( "a" ); }
QString prefix() const override { return QStringLiteral( "af" ); }

void prepare( const QString &string, const QgsLocatorContext &context ) override;
void fetchResults( const QString &string, const QgsLocatorContext &context, QgsFeedback *feedback ) override;
Expand Down

0 comments on commit 53c3150

Please sign in to comment.