Skip to content
Permalink
Browse files

Apply suggestions from code review

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
  • Loading branch information
3nids and nyalldawson committed Sep 24, 2020
1 parent f87fb04 commit d7b9e0b095fabe8f38c1a33e4a08de8d93738412
Showing with 2 additions and 3 deletions.
  1. +1 −2 src/app/locator/qgsinbuiltlocatorfilters.cpp
  2. +1 −1 tests/src/app/testqgsapplocatorfilters.cpp
@@ -262,7 +262,7 @@ QStringList QgsActiveLayerFeaturesLocatorFilter::prepare( const QString &string,
mFieldsCompletion.clear();

// Normally skip very short search strings, unless when specifically searching using this filter or try to match fields
if ( string.length() < 3 && !context.usingPrefix && !string.startsWith( QStringLiteral( "@" ) ) )
if ( string.length() < 3 && !context.usingPrefix && !string.startsWith( '@' ) ) )
return QStringList();

QgsSettings settings;
@@ -1133,4 +1133,3 @@ void QgsGotoLocatorFilter::triggerResult( const QgsLocatorResult &result )

mapCanvas->flashGeometries( QList< QgsGeometry >() << QgsGeometry::fromPointXY( point ) );
}

@@ -224,7 +224,7 @@ void TestQgsAppLocatorFilters::testActiveLayerFieldRestriction()
search = QStringLiteral( "@" );
restr = QgsActiveLayerFeaturesLocatorFilter::fieldRestriction( search );
QVERIFY( !restr.isNull() );
QCOMPARE( search, QStringLiteral( "" ) );
QCOMPARE( search, QString() );

search = QStringLiteral( "hello there" );
restr = QgsActiveLayerFeaturesLocatorFilter::fieldRestriction( search );

0 comments on commit d7b9e0b

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