Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty query does not get processed in query builder #15204

Closed
qgib opened this issue May 25, 2012 · 1 comment
Closed

Empty query does not get processed in query builder #15204

qgib opened this issue May 25, 2012 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented May 25, 2012

Author Name: Leyan Ouyang (Leyan Ouyang)
Original Redmine Issue: 5641
Affected QGIS version: master


If the query text box is empty when clicking the OK button, the empty string is not used and evaluated. This means that if there was already a query existing, it is kept, instead of the expected result of clearing it. Validating an empty query should be equivalent to clearing the query.

This is due to a test made in QgsQueryBuilder::accept(), skipping the validation for an empty query. I do not see the point of this test, so I propose simply to remove it. If it is useful to avoid validation of an empty query for another reason, we should still validate it with mLayer->setSubsetString( "" );

Patch attached.


@qgib
Copy link
Contributor Author

qgib commented Jun 16, 2012

Author Name: Jürgen Fischer (@jef-n)


fixed in ed70b94


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant