Skip to content
Permalink
Browse files

Fix test message from query builder

Fixes #34259
  • Loading branch information
elpaso committed Feb 5, 2020
1 parent 2e766b6 commit 5d8c4f8337fd2b4854a7e2bcea7e92a14c371602
Showing with 14 additions and 3 deletions.
  1. +14 −3 src/gui/qgsquerybuilder.cpp
@@ -218,9 +218,20 @@ void QgsQueryBuilder::test()
{
mUseUnfilteredLayer->setDisabled( mLayer->subsetString().isEmpty() );

QMessageBox::information( this,
tr( "Query Result" ),
tr( "The where clause returned %n row(s).", "returned test rows", mLayer->featureCount() ) );
const long featureCount { mLayer->featureCount() };
// Check for errors
if ( featureCount < 0 )
{
QMessageBox::warning( this,
tr( "Query Result" ),
tr( "An error occurred when executing the query, please check the expression syntax." ) );
}
else
{
QMessageBox::information( this,
tr( "Query Result" ),
tr( "The where clause returned %n row(s).", "returned test rows", featureCount ) );
}
}
else if ( mLayer->dataProvider()->hasErrors() )
{

0 comments on commit 5d8c4f8

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