Skip to content
Permalink
Browse files

correctly set feature request, prefix now set to 'af'

  • Loading branch information
3nids committed Sep 7, 2018
1 parent 2aa280e commit 53c3150027dcdc3f0055de8acfeb4e18864ca759
Showing with 4 additions and 2 deletions.
  1. +3 −1 src/app/locator/qgsinbuiltlocatorfilters.cpp
  2. +1 −1 src/app/locator/qgsinbuiltlocatorfilters.h
@@ -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 ) );
@@ -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;

0 comments on commit 53c3150

Please sign in to comment.
You can’t perform that action at this time.