-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Filter improvements #18084
Comments
Author Name: Etienne Tourigny (@etiennesky) Hi, when I implemented the filter functionality I did things as simple as possible, using QT's QRegexp [1] class with minimal work (basically passing the search string to QRegExp). The "Wildcard" option uses QRegExp::Wildcard PatternSyntax (defined in [2]) and the "Regular Expression" option uses QRegExp::RegExp. Note that this was implemented with files in mind, which is where it is most useful (imagine a directory of 1000s of files). Your suggestions are valid. The behavior is different from WFS and Oracle add-data dialogs simply because they were implemented by different people. What would your suggestion for "Normal" search? Should wildcards like * and ? be permitted inside the string? or just a simple string with wildcards at beginning and end? Case-insensitive search should have an option, it would be ok to have it case-insensitive by default. [1] http://qt-project.org/doc/qt-4.8/qregexp.html
|
Author Name: Etienne Tourigny (@etiennesky) see my implementation here with commit "browser dock: add normal syntax (with wildcards at begin and end) and case insensitive search, both default" https://github.com/etiennesky/Quantum-GIS/tree/browser_search If satisfactory I will add to master after 2.2 is out |
Author Name: Jonathan Moules (Jonathan Moules) Hi Etienne, I'd suggest the default behaviour should be the same as a web-browser search (when you Ctrl-F). I think no wildcards from the user, at least not in the default search. There are current two search functions (Wildcards, Regexp). I'd suggest a third "Normal" which is the default and has this specified behaviour. Then you don't need to change the other two (except probably the case insensitive checkbox). I'm afraid I'm not a dev so can't look at a commit and have any clue what it'll do. And thanks for the prompt response! |
Author Name: Etienne Tourigny (@etiennesky) Fixed in changeset "ececdb71aec28882c49eab4acd0fcdb31b8155ff".
|
Author Name: Jonathan Moules (Jonathan Moules)
Original Redmine Issue: 9493
Redmine category:browser
Assignee: Etienne Tourigny
There are a number of simple improvements that I believe can be made to the Browser filter function to make it more useable:
a) By Default wildcards should be placed at the start and end of all search terms automatically. Maybe add this as a new "default" search called "Normal".
b) By Default make it case-insensitive. If necessary add a checkbox for "match case", but it should be unchecked by default.
The current behaviour for both of these is extremely non-obvious and I almost reported a bug saying that the filter wasn't working. Both of these are the default for most search functions in most applications I can think of, including ironically, the filters in the WFS and Oracle add-data dialogs.
The text was updated successfully, but these errors were encountered: